home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / technote / tn_265.hqx / TN.265.Pascal to C PROC Parms
Unknown  |  1990-02-19  |  34.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert TTComp Archive (archive/ttcomp) fallback Supported
100% file TTComp archive data, binary, 4K dictionary default (weak)
99% file data default
100% TrID TTComp archive compressed (bin-4K) default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 01 65 00 01 00 04 | 00 00 00 ff ff ff ff fc |...e....|........|
|00000010| 00 01 00 00 86 f4 01 50 | 01 50 00 00 85 40 01 48 |.......P|.P...@.H|
|00000020| 01 48 00 00 85 40 01 38 | 00 03 00 00 00 48 00 48 |.H...@.8|.....H.H|
|00000030| 00 00 00 00 02 da 02 28 | ff e1 ff e2 02 f9 02 46 |.......(|.......F|
|00000040| 03 47 05 28 03 fc 00 02 | 00 00 00 48 00 48 00 00 |.G.(....|...H.H..|
|00000050| 00 00 02 da 02 28 00 01 | 00 00 00 64 00 00 00 01 |.....(..|...d....|
|00000060| 00 01 01 01 00 00 00 01 | 7d 00 00 01 00 01 00 64 |........|}......d|
|00000070| 59 44 00 64 59 d0 80 23 | 00 00 00 02 00 19 01 90 |YD.dY..#|........|
|00000080| 00 00 00 00 00 40 00 00 | 00 00 00 00 00 00 00 01 |.....@..|........|
|00000090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 01 00 00 00 02 00 00 | 00 00 00 01 00 00 68 7c |........|......h||
|000000b0| 00 40 00 00 61 14 00 14 | 00 18 01 bb ff f2 00 ec |.@..a...|........|
|000000c0| ff f2 01 ba f8 25 00 00 | ff ff ff ff ff ff 00 01 |.....%..|........|
|000000d0| 00 00 00 01 00 00 00 00 | ff ff 00 00 5c 0c 00 10 |........|....\...|
|000000e0| 00 00 01 60 00 02 ff f2 | 00 1e ff f2 00 ec ff f2 |...`....|........|
|000000f0| 01 ba f8 25 00 00 00 ff | ff ff ff ff 01 64 00 00 |...%....|.....d..|
|00000100| 01 64 00 00 00 00 00 01 | 00 00 70 a4 16 50 00 00 |.d......|..p..P..|
|00000110| 68 bc 07 e8 ff f2 00 1e | ff f2 00 ec ff f2 01 ba |h.......|........|
|00000120| 00 00 00 00 ff 00 ff ff | ff ff 00 00 01 e6 03 01 |........|........|
|00000130| 00 13 f4 6f 75 42 b1 40 | f5 21 d1 41 3c 1f 3a f0 |...ouB.@|.!.A<.:.|
|00000140| d0 00 00 06 00 00 0c 01 | 00 14 00 00 ff d6 00 22 |........|......."|
|00000150| 03 be 00 0d 4d 41 47 49 | 43 50 49 43 11 01 ff b9 |....MAGI|CPIC....|
|00000160| 00 00 00 14 00 2f f2 3f | 32 f3 6f 35 f3 a0 0f 50 |...../.?|2.o5...P|
|00000170| 68 c6 a0 25 0f 43 f3 a0 | 0f 50 f5 2f 4f f4 3f 45 |h..%.C..|.P./O.?E|
|00000180| f4 4f 55 f5 2f 45 0f 50 | 64 6f 6d 12 14 8f 09 05 |.OU./E.P|dom.....|
|00000190| d0 f3 80 00 00 06 00 00 | 0a 00 00 14 0a 00 00 14 |........|........|
|000001a0| 00 27 f5 74 72 21 30 f6 | 2f 79 f3 af 09 f4 b1 72 |.'.tr!0.|/y.....r|
|000001b0| b0 f5 25 aa 73 f0 9f 46 | 1f 62 4f 75 64 f7 90 f3 |..%.s..F|.bOud...|
|000001c0| 1f 39 f3 9f 30 f0 d0 00 | 00 06 00 00 0c 00 00 14 |.9..0...|........|
|000001d0| 00 2d 01 dd 03 00 00 00 | 00 1b 02 07 02 07 02 10 |.-......|........|
|000001e0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000001f0| 02 10 00 01 0d 02 00 06 | 00 00 0c 00 00 14 00 00 |........|........|
|00000200| 12 01 00 14 00 1e fa 5f | 09 f5 95 f7 54 09 13 27 |......._|....T..'|
|00000210| 82 f2 c0 2f 77 7c 10 60 | f7 91 64 f2 ef 0d 00 06 |.../w|.`|..d.....|
|00000220| 00 00 0c 00 00 14 00 02 | 7d 0d 00 06 00 00 09 00 |........|}.......|
|00000230| 00 16 00 11 2f 79 e1 91 | d0 82 4f 75 c2 0f 7b f0 |..../y..|..Ou..{.|
|00000240| d0 00 00 06 00 00 09 00 | 00 16 00 01 0d ff 00 06 |........|........|
|00000250| 00 00 0c 00 00 14 00 01 | 0d 01 00 06 00 00 0c 00 |........|........|
|00000260| 00 14 00 02 7d 0d 00 06 | 00 00 09 00 00 16 00 3c |....}...|.......<|
|00000270| e6 8c 6a 0f 76 57 90 f4 | 35 f7 53 2f 47 46 f7 a1 |..j.vW..|5.S/GF..|
|00000280| 48 f2 8f 54 f4 ff 62 f6 | a1 c2 f2 a0 72 1f 6d f2 |H..T..b.|....r.m.|
|00000290| c0 f7 65 79 f2 a0 82 62 | 7c f4 c7 3f 6b f2 90 f7 |..ey...b||..?k...|
|000002a0| bf 0d 00 06 00 00 09 00 | 00 16 00 37 e6 8c 6a 0f |........|...7..j.|
|000002b0| 76 57 90 f4 45 f4 74 6f | 7a 1f 28 f5 4f 4f f6 2f |vW..E.to|z.(.OO./|
|000002c0| 6a 1c 2f 2a 07 21 f6 df | 2c 0f 76 57 9f 2a 08 26 |j./*.!..|,.vW.*.&|
|000002d0| 27 cf 4c 73 f6 bf 29 0f | 7b f0 d0 00 00 06 00 00 |'.Ls..).|{.......|
|000002e0| 09 00 00 16 00 8b f3 4f | 29 f0 9f 43 68 1f 3a 00 |.......O|)..Ch.:.|
|000002f0| f5 95 f7 50 95 3f d5 20 | 31 19 06 cc 18 80 25 06 |...P.?. |1.....%.|
|00000300| 3f 79 2b 73 f6 70 d4 5f | 6d 02 b1 0b 58 20 e4 5c |?y+s.p._|m...X .\|
|00000310| 19 f7 54 10 f2 87 3c af | 75 97 3f 67 0a 5c 6a 0f |..T...<.|u.?g.\j.|
|00000320| 76 64 76 f6 2a 18 06 39 | 02 b7 8f 29 f2 e0 0f 50 |vdv.*..9|...)...P|
|00000330| 68 80 60 f4 ef 49 f4 c0 | d5 40 2b 10 82 62 7c 0a |h.`..I..|.@+..b|.|
|00000340| 73 f6 bf 2e f0 d0 00 1e | 00 00 0c 00 00 14 00 63 |s.......|.......c|
|00000350| 0c 00 00 16 00 67 0c 00 | 00 14 00 72 0c 00 00 16 |.....g..|...r....|
|00000360| 00 75 0c 00 00 14 00 00 | 00 06 00 00 0c 00 00 14 |.u......|........|
|00000370| 00 01 0d 00 00 06 00 00 | 0c 00 00 14 00 01 0d 03 |........|........|
|00000380| 00 06 00 00 0c 00 00 14 | 00 02 7d 0d 00 06 00 00 |........|..}.....|
|00000390| 09 00 00 16 00 01 0d 01 | 00 06 00 00 0c 00 00 14 |........|........|
|000003a0| 00 01 0d 01 00 06 00 00 | 0c 00 00 14 00 1f 54 4c |........|......TL|
|000003b0| 69 73 74 20 3d 20 4f 42 | 4a 45 43 54 20 28 54 44 |ist = OB|JECT (TD|
|000003c0| 79 6e 61 6d 69 63 41 72 | 72 61 79 29 0d 00 00 06 |ynamicAr|ray)....|
|000003d0| 00 00 09 00 00 16 00 01 | 0d ff 00 06 00 00 0c 00 |........|........|
|000003e0| 00 14 00 09 01 dd 00 00 | 00 00 00 09 02 07 02 07 |........|........|
|000003f0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00000400| 02 10 02 10 00 09 01 dd | 03 00 00 00 00 09 02 07 |........|........|
|00000410| 02 07 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00000420| 02 10 02 10 02 10 00 01 | 0d 04 00 06 00 00 0c 00 |........|........|
|00000430| 00 14 00 09 20 20 20 20 | 45 4e 44 3b 0d 00 00 06 |.... |END;....|
|00000440| 00 00 09 00 00 16 00 06 | 20 20 56 41 52 0d 00 06 |........| VAR...|
|00000450| 00 00 09 00 00 16 00 01 | 0d 00 00 06 00 00 0c 00 |........|........|
|00000460| 00 14 00 01 0d 01 00 06 | 00 00 0c 00 00 14 00 02 |........|........|
|00000470| 7d 0d 00 06 00 00 09 00 | 00 16 00 49 2f 79 e1 91 |}.......|...I/y..|
|00000480| d0 e6 8c 6a 0f 76 57 90 | f2 8f 2a f4 67 1a 9f 50 |...j.vW.|..*.g..P|
|00000490| 45 cf 50 24 f2 90 f2 8f | 53 24 73 f6 7f 50 24 0d |E.P$....|S$s..P$.|
|000004a0| 71 a9 f4 e6 f6 d1 f2 c0 | f5 02 40 d7 1a 9f 41 99 |q.......|..@...A.|
|000004b0| 4f 2c f0 d0 00 06 00 00 | 09 00 00 16 00 01 0d 00 |O,......|........|
|000004c0| 00 06 00 00 0c 00 00 14 | 00 01 0d 04 00 06 00 00 |........|........|
|000004d0| 0c 00 00 14 00 01 0d 76 | 00 06 00 00 0c 00 00 14 |.......v|........|
|000004e0| 00 01 0d 03 00 06 00 00 | 0c 00 00 14 00 01 0d 5f |........|......._|
|000004f0| 00 06 00 00 0e 01 00 14 | 00 33 fa 5f 09 f4 df 50 |........|.3._...P|
|00000500| f5 70 f3 3f 2e f3 00 f5 | 06 8c 6a 0f 52 1d 14 13 |.p.?....|..j.R...|
|00000510| c1 f2 c0 f4 3b 6e 21 40 | f3 8f 2c 0e ef 2e 0f 31 |....;n!@|..,....1|
|00000520| f3 4f 35 f2 df 31 f3 4f | 37 f0 d0 00 00 12 00 00 |.O5..1.O|7.......|
|00000530| 0c 00 00 14 00 02 0c 02 | 00 14 00 1a 0c 00 00 14 |........|........|
|00000540| 00 5e 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |.^______|________|
|00000550| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000560| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000570| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000580| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000590| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 0d |________|_______.|
|000005a0| 00 06 00 00 0a 00 00 14 | 00 28 f4 85 f7 70 f5 06 |........|.(...p..|
|000005b0| 8c 6a 0f 49 f6 de a1 f6 | d1 32 80 f4 e1 82 19 0f |.j.I....|.2......|
|000005c0| 50 45 c1 9f 75 41 8f 0d | 00 06 00 00 0e 01 00 14 |PE..uA..|........|
|000005d0| 00 01 0d 04 00 06 00 00 | 0c 00 00 14 00 34 00 00 |........|.....4..|
|000005e0| f6 df 79 f4 74 6f 7a 14 | f4 c7 82 f2 df 3e f4 56 |..y.toz.|.....>.V|
|000005f0| cb f2 8f 43 5f 75 32 f4 | 74 6f 7a 14 8f 2c 0f 26 |...C_u2.|toz..,.&|
|00000600| f6 74 6f 7a 14 f4 35 f7 | 53 2f 29 f3 bf 0d 00 06 |.toz..5.|S/).....|
|00000610| 00 00 09 00 00 16 5f 5f | 5f 5f 00 01 0d ff 00 06 |......__|__......|
|00000620| 00 00 09 00 00 16 00 01 | 0d ff 00 06 00 00 09 00 |........|........|
|00000630| 00 16 00 00 0a 00 00 14 | 00 01 0d 6f 00 06 00 00 |........|...o....|
|00000640| 0e 01 00 14 00 01 0d 00 | 00 06 00 00 0c 00 00 14 |........|........|
|00000650| 00 09 01 dd 00 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|00000660| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00000670| 02 10 00 37 e6 8c 6a 0f | 76 57 90 f4 45 f4 74 6f |...7..j.|vW..E.to|
|00000680| 7a 1f 28 f5 4f 4f f6 2f | 6a 1c 2f 2a 07 21 f6 df |z.(.OO./|j./*.!..|
|00000690| 2c 0f 76 57 9f 2a 08 26 | 27 cf 4c 73 f6 bf 29 0f |,.vW.*.&|'.Ls..).|
|000006a0| 7b f0 d0 00 00 06 00 00 | 09 00 00 16 00 15 00 00 |{.......|........|
|000006b0| 73 20 5d df 54 b1 f4 3a | 7d df 3b f0 d0 00 00 06 |s ].T..:|}.;.....|
|000006c0| 00 00 09 00 00 16 70 72 | 6f 67 72 61 00 36 00 00 |......pr|ogra.6..|
|000006d0| a5 c6 af 56 64 80 f2 ab | 58 2f 4c 5c 6a 80 f3 d0 |...Vd...|X/L\j...|
|000006e0| f2 8a 5c 6a f5 66 48 0f | 2a f2 90 82 62 7c f4 c7 |..\j.fH.|*...b|..|
|000006f0| 3f 6b f3 bf 0d 00 00 06 | 00 00 09 00 00 16 00 2a |?k......|.......*|
|00000700| f4 13 01 f7 86 f6 de a1 | 05 d0 2b 78 0c 5f 75 a9 |........|..+x._u.|
|00000710| 0a 55 f6 b0 68 0d 5a a5 | f7 78 f3 af 0d 00 00 06 |.U..h.Z.|.x......|
|00000720| 00 00 0c 00 00 14 65 2e | 0d 79 00 12 00 00 0c 00 |......e.|.y......|
|00000730| 00 14 00 01 0d ff 00 06 | 00 00 09 00 00 16 00 02 |........|........|
|00000740| 7d 0d 00 06 00 00 09 00 | 00 16 00 5c 00 f4 45 f5 |}.......|...\..E.|
|00000750| 45 f4 67 1a 9f 28 f2 2f | 5c ef 54 f4 af 75 82 f4 |E.g..(./|\.T..u..|
|00000760| 35 f6 df 6d 63 9f 22 f2 | c0 37 af 2c 0f 62 f4 3a |5..mc.".|.7.,.b.:|
|00000770| 68 8f 2c 0f 53 26 27 cf | 4c 73 f6 b0 f3 f0 f5 32 |h.,.S&'.|Ls.....2|
|00000780| 62 7c f4 c7 3f 6b 0f 3a | 0f 76 57 9f 29 f3 b0 f2 |b|..?k.:|.vW.)...|
|00000790| ff 2a 0f 4e 50 f5 75 4f | 6b 71 0f 2a f2 ff 0d 00 |.*.NP.uO|kq.*....|
|000007a0| 00 06 00 00 09 00 00 16 | 00 05 45 4e 44 3b 0d ff |........|..END;..|
|000007b0| 00 06 00 00 09 00 00 16 | 00 01 0d 04 00 06 00 00 |........|........|
|000007c0| 0c 00 00 14 01 44 01 68 | 00 00 00 00 00 01 0d 00 |.....D.h|........|
|000007d0| 00 06 00 00 0c 00 00 14 | 00 d5 50 61 73 63 61 6c |........|..Pascal|
|000007e0| 20 6c 65 74 73 20 70 72 | 6f 67 72 61 6d 6d 65 72 | lets pr|ogrammer|
|000007f0| 73 20 6e 65 73 74 20 70 | 72 6f 63 65 64 75 72 65 |s nest p|rocedure|
|00000800| 73 20 77 69 74 68 69 6e | 20 65 61 63 68 20 6f 74 |s within| each ot|
|00000810| 68 65 72 2e 20 20 44 6f | 69 6e 67 20 73 6f 20 61 |her. Do|ing so a|
|00000820| 6c 6c 6f 77 73 20 6f 6e | 65 20 74 6f 20 6c 69 6d |llows on|e to lim|
|00000830| 69 74 20 74 68 65 20 73 | 63 6f 70 65 20 6f 66 20 |it the s|cope of |
|00000840| 6c 6f 63 61 6c 20 76 61 | 72 69 61 62 6c 65 73 2c |local va|riables,|
|00000850| 20 61 73 20 77 65 6c 6c | 20 61 73 20 61 6c 6c 6f | as well| as allo|
|00000860| 77 20 6d 75 6c 74 69 70 | 6c 65 20 70 72 6f 63 65 |w multip|le proce|
|00000870| 64 75 72 65 73 20 61 63 | 63 65 73 73 20 74 6f 20 |dures ac|cess to |
|00000880| 74 68 65 20 73 61 6d 65 | 20 73 65 74 20 6f 66 20 |the same| set of |
|00000890| 64 79 6e 61 6d 69 63 61 | 6c 6c 79 20 63 72 65 61 |dynamica|lly crea|
|000008a0| 74 65 64 20 76 61 72 69 | 61 62 6c 65 73 2e 0d 40 |ted vari|ables..@|
|000008b0| 00 06 00 00 0c 00 00 14 | 00 01 0d 61 00 06 00 00 |........|...a....|
|000008c0| 0c 00 00 14 00 30 4c 65 | 74 d5 73 20 74 61 6b 65 |.....0Le|t.s take|
|000008d0| 20 61 20 6c 6f 6f 6b 20 | 61 74 20 74 68 65 20 66 | a look |at the f|
|000008e0| 6f 6c 6c 6f 77 69 6e 67 | 20 62 69 74 20 6f d5 20 |ollowing| bit o. |
|000008f0| 63 6f 64 65 3a 0d 00 06 | 00 00 0c 00 00 14 00 55 |code:...|.......U|
|00000900| 50 52 4f 43 45 44 55 52 | 45 20 54 4a 75 73 74 43 |PROCEDUR|E TJustC|
|00000910| 6f 6d 6d 61 6e 64 2e 46 | 69 65 6c 64 73 28 50 52 |ommand.F|ields(PR|
|00000920| 4f 43 45 44 55 52 45 20 | 44 6f 54 6f 46 69 65 6c |OCEDURE |DoToFiel|
|00000930| 64 28 66 69 65 6c 64 4e | 61 6d 65 3a 20 53 74 72 |d(fieldN|ame: Str|
|00000940| 32 35 35 3b 20 66 69 65 | 6c 64 41 64 64 72 3a 20 |255; fie|ldAddr: |
|00000950| 50 74 72 3b 0d 34 00 06 | 00 00 09 00 00 16 00 09 |Ptr;.4..|........|
|00000960| 20 20 20 20 45 4e 44 3b | 0d 45 00 06 00 00 09 00 | END;|.E......|
|00000970| 00 16 09 00 00 16 00 01 | 0d 20 00 06 00 00 09 00 |........|. ......|
|00000980| 00 16 00 0a 20 20 20 20 | 42 45 47 49 4e 0d 00 06 |.... |BEGIN...|
|00000990| 00 00 09 00 00 16 00 09 | 20 20 20 20 45 4e 44 3b |........| END;|
|000009a0| 0d 39 00 06 00 00 09 00 | 00 16 00 01 0d 14 00 06 |.9......|........|
|000009b0| 00 00 09 00 00 16 00 3f | 20 20 50 52 4f 43 45 44 |.......?| PROCED|
|000009c0| 55 52 45 20 43 61 6c 6c | 69 6e 67 50 72 6f 63 65 |URE Call|ingProce|
|000009d0| 64 75 72 65 3b 20 20 20 | 20 20 20 20 20 7b 20 4f |dure; | { O|
|000009e0| 75 74 65 72 20 6c 65 76 | 65 6c 20 70 72 6f 63 65 |uter lev|el proce|
|000009f0| 64 75 72 65 20 7d 0d 00 | 00 06 00 00 09 00 00 16 |dure }..|........|
|00000a00| 00 01 0d 00 00 06 00 00 | 09 00 00 16 00 08 20 20 |........|...... |
|00000a10| 20 20 56 41 52 0d 00 06 | 00 00 09 00 00 16 00 15 | VAR...|........|
|00000a20| 20 20 20 20 20 20 61 56 | 61 72 3a 20 69 6e 74 65 | aV|ar: inte|
|00000a30| 67 65 72 3b 0d 00 00 06 | 00 00 09 00 00 16 00 01 |ger;....|........|
|00000a40| 0d 00 00 06 00 00 09 00 | 00 16 00 4e 20 20 20 20 |........|...N |
|00000a50| 50 52 4f 43 45 44 55 52 | 45 20 4e 65 73 74 65 64 |PROCEDUR|E Nested|
|00000a60| 43 61 6c 6c 42 61 63 6b | 3b 20 20 20 20 20 20 20 |CallBack|; |
|00000a70| 20 7b 20 4e 65 73 74 65 | 64 20 70 72 6f 63 65 64 | { Neste|d proced|
|00000a80| 75 72 65 20 2d 20 63 61 | 6e 20 61 63 63 65 73 73 |ure - ca|n access|
|00000a90| 20 d2 61 56 61 72 d3 20 | 7d 0d 00 06 00 00 09 00 | .aVar. |}.......|
|00000aa0| 00 16 00 01 0d ff 00 06 | 00 00 09 00 00 16 00 0a |........|........|
|00000ab0| 20 20 20 20 20 20 56 41 | 52 0d 00 06 00 00 09 00 | VA|R.......|
|00000ac0| 00 16 00 1d 20 20 20 20 | 20 20 20 20 61 6e 6f 74 |.... | anot|
|00000ad0| 68 65 72 56 61 72 3a 20 | 69 6e 74 65 67 65 72 3b |herVar: |integer;|
|00000ae0| 0d 08 00 06 00 00 09 00 | 00 16 00 01 0d 6a 00 06 |........|.....j..|
|00000af0| 00 00 09 00 00 16 00 1e | 20 20 20 20 20 20 42 45 |........| BE|
|00000b00| 47 49 4e 20 7b 4e 65 73 | 74 65 64 43 61 6c 6c 42 |GIN {Nes|tedCallB|
|00000b10| 61 63 6b 20 7d 0d 00 06 | 00 00 09 00 00 16 00 13 |ack }...|........|
|00000b20| 20 20 20 20 20 20 20 20 | 61 56 61 72 20 3a 3d 20 | |aVar := |
|00000b30| 31 3b 0d 00 00 06 00 00 | 09 00 00 16 00 19 20 20 |1;......|...... |
|00000b40| 20 20 20 20 20 20 61 6e | 6f 74 68 65 72 56 61 72 | an|otherVar|
|00000b50| 20 3a 3d 20 32 3b 0d 00 | 00 06 00 00 09 00 00 16 | := 2;..|........|
|00000b60| 00 1d 20 20 20 20 20 20 | 45 4e 44 3b 20 7b 4e 65 |.. |END; {Ne|
|00000b70| 73 74 65 64 43 61 6c 6c | 42 61 63 6b 20 7d 0d 00 |stedCall|Back }..|
|00000b80| 00 06 00 00 09 00 00 16 | 00 01 0d 00 00 06 00 00 |........|........|
|00000b90| 09 00 00 16 00 1e 20 20 | 20 20 42 45 47 49 4e 20 |...... | BEGIN |
|00000ba0| 7b 43 61 6c 6c 69 6e 67 | 50 72 6f 63 65 64 75 72 |{Calling|Procedur|
|00000bb0| 65 20 7d 0d 00 06 00 00 | 09 00 00 16 00 10 20 20 |e }.....|...... |
|00000bc0| 20 20 20 20 43 61 6c 6c | 42 61 63 6b 3b 0d 00 06 | Call|Back;...|
|00000bd0| 00 00 09 00 00 16 00 18 | 20 20 20 20 20 20 20 20 |........| |
|00000be0| 4e 65 73 74 65 64 43 61 | 6c 6c 42 61 63 6b 3b 0d |NestedCa|llBack;.|
|00000bf0| 00 06 00 00 09 00 00 16 | 00 18 f5 06 8c 6a 02 50 |........|.....j.P|
|00000c00| f4 3f 2b f2 b0 25 0f 50 | 68 c6 af 0d 00 06 00 00 |.?+..%.P|h.......|
|00000c10| 0e 01 00 14 00 07 20 20 | 54 59 50 45 0d 01 00 06 |...... |TYPE....|
|00000c20| 00 00 09 00 00 16 00 01 | 0d 00 00 06 00 00 0c 00 |........|........|
|00000c30| 00 14 00 00 00 06 00 00 | 0c 00 00 14 01 68 00 01 |........|.....h..|
|00000c40| 0d 04 00 06 00 00 0c 00 | 00 14 0c 00 00 14 00 f6 |........|........|
|00000c50| 54 68 69 73 20 63 6f 64 | 65 20 73 68 6f 77 73 20 |This cod|e shows |
|00000c60| 74 68 72 65 65 20 50 61 | 73 63 61 6c 20 70 72 6f |three Pa|scal pro|
|00000c70| 63 65 64 75 72 65 73 3a | 20 20 43 61 6c 6c 69 6e |cedures:| Callin|
|00000c80| 67 50 72 6f 63 65 64 75 | 72 65 2c 20 43 61 6c 6c |gProcedu|re, Call|
|00000c90| 42 61 63 6b 2c 20 61 6e | 64 20 4e 65 73 74 65 64 |Back, an|d Nested|
|00000ca0| 43 61 6c 6c 42 61 63 6b | 2e 20 20 4e 65 73 74 65 |CallBack|. Neste|
|00000cb0| 64 43 61 6c 6c 42 61 63 | 6b 20 69 73 20 74 68 65 |dCallBac|k is the|
|00000cc0| 20 6e 65 73 74 65 64 20 | 70 72 6f 63 65 64 75 72 | nested |procedur|
|00000cd0| 65 2c 20 77 68 69 63 68 | 20 6d 65 61 6e 73 20 74 |e, which| means t|
|00000ce0| 68 61 74 20 69 74 20 63 | 61 6e 20 61 63 63 65 73 |hat it c|an acces|
|00000cf0| 73 20 74 68 65 20 6c 6f | 63 61 6c 20 76 61 72 69 |s the lo|cal vari|
|00000d00| 61 62 6c 65 73 20 6f 66 | 20 74 68 65 20 70 72 6f |ables of| the pro|
|00000d10| 63 65 64 75 72 65 20 69 | 74 20 69 73 20 6e 65 73 |cedure i|t is nes|
|00000d20| 74 65 64 20 77 69 74 68 | 69 6e 2c 20 6e 61 6d 65 |ted with|in, name|
|00000d30| 6c 79 2c 20 43 61 6c 6c | 69 6e 67 50 72 6f 63 65 |ly, Call|ingProce|
|00000d40| 64 75 72 65 2e 0d 00 42 | 00 00 0c 00 00 14 00 2a |dure...B|.......*|
|00000d50| 0c 00 00 16 00 3a 0c 00 | 00 14 00 3c 0c 00 00 16 |.....:..|...<....|
|00000d60| 00 44 0c 00 00 14 00 4a | 0c 00 00 16 00 58 0c 00 |.D.....J|.....X..|
|00000d70| 00 14 00 5b 0c 00 00 16 | 00 69 0c 00 00 14 00 e4 |...[....|.i......|
|00000d80| 0c 00 00 16 00 f4 0c 00 | 00 14 00 01 0d 00 00 06 |........|........|
|00000d90| 00 00 0c 00 00 14 01 e2 | 54 68 65 20 6d 65 74 68 |........|The meth|
|00000da0| 6f 64 20 75 73 65 64 20 | 74 6f 20 61 6c 6c 6f 77 |od used |to allow|
|00000db0| 20 4e 65 73 74 65 64 43 | 61 6c 6c 42 61 63 6b 20 | NestedC|allBack |
|00000dc0| 74 6f 20 61 63 63 65 73 | 73 20 69 74 73 20 68 6f |to acces|s its ho|
|00000dd0| 73 74 20 70 72 6f 63 65 | 64 75 72 65 d5 73 20 6c |st proce|dure.s l|
|00000de0| 6f 63 61 6c 20 76 61 72 | 69 61 62 6c 65 73 20 69 |ocal var|iables i|
|00000df0| 73 20 6e 6f 74 20 73 6f | 20 6f 62 76 69 6f 75 73 |s not so| obvious|
|00000e00| 20 61 6e 64 20 69 6e 76 | 6f 6c 76 65 73 20 61 20 | and inv|olves a |
|00000e10| 6c 69 74 74 6c 65 20 68 | 61 63 6b 2e 20 20 41 73 |little h|ack. As|
|00000e20| 20 79 6f 75 20 6d 61 79 | 20 6b 6e 6f 77 2c 20 6c | you may| know, l|
|00000e30| 6f 63 61 6c 20 76 61 72 | 69 61 62 6c 65 73 20 61 |ocal var|iables a|
|00000e40| 72 65 20 63 72 65 61 74 | 65 64 20 6f 6e 20 74 68 |re creat|ed on th|
|00000e50| 65 20 73 74 61 63 6b 20 | 77 68 65 6e 20 61 20 70 |e stack |when a p|
|00000e60| 72 6f 63 65 64 75 72 65 | 20 69 73 20 65 6e 74 65 |rocedure| is ente|
|00000e70| 72 65 64 2c 20 61 6e 64 | 20 74 68 65 20 36 38 30 |red, and| the 680|
|00000e80| 78 30 20 72 65 67 69 73 | 74 65 72 20 41 36 20 69 |x0 regis|ter A6 i|
|00000e90| 73 20 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 74 6f |s initia|lized to|
|00000ea0| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 6d 2e 20 | point t|o them. |
|00000eb0| 20 46 69 6e 65 2c 20 62 | 75 74 20 74 68 69 73 20 | Fine, b|ut this |
|00000ec0| 6c 65 61 64 73 20 74 6f | 20 61 20 6c 69 74 74 6c |leads to| a littl|
|00000ed0| 65 20 63 6f 6e 66 6c 69 | 63 74 20 77 69 74 68 69 |e confli|ct withi|
|00000ee0| 6e 20 4e 65 73 74 65 64 | 43 61 6c 6c 42 61 63 6b |n Nested|CallBack|
|00000ef0| 2e 20 20 49 74 20 6e 65 | 65 64 73 20 74 6f 20 75 |. It ne|eds to u|
|00000f00| 73 65 20 41 36 20 74 6f | 20 70 6f 69 6e 74 20 74 |se A6 to| point t|
|00000f10| 6f 20 69 74 73 20 6f 77 | 6e 20 6c 6f 63 61 6c 20 |o its ow|n local |
|00000f20| 76 61 72 69 61 62 6c 65 | 73 20 28 65 2e 67 2e 2c |variable|s (e.g.,|
|00000f30| 20 61 6e 6f 74 68 65 72 | 56 61 72 29 2c 20 73 6f | another|Var), so|
|00000f40| 20 68 6f 77 20 64 6f 65 | 73 20 69 74 20 61 63 63 | how doe|s it acc|
|00000f50| 65 73 73 20 69 74 73 20 | 68 6f 73 74 20 70 72 6f |ess its |host pro|
|00000f60| 63 65 64 75 72 65 d5 73 | 20 6c 6f 63 61 6c 20 76 |cedure.s| local v|
|00000f70| 61 72 69 61 62 6c 65 73 | 3f 0d 00 42 00 00 0c 00 |ariables|?..B....|
|00000f80| 00 14 00 19 0c 00 00 16 | 00 27 0c 00 00 14 00 f4 |........|.'......|
|00000f90| 0c 00 00 16 00 f6 0c 00 | 00 14 01 4a 0c 00 00 16 |........|...J....|
|00000fa0| 01 58 0c 00 00 14 01 6b | 0c 00 00 16 01 6d 0c 00 |.X.....k|.....m..|
|00000fb0| 00 14 01 99 0c 00 00 16 | 01 a3 0c 00 00 14 00 01 |........|........|
|00000fc0| 0d ff 00 06 00 00 0c 00 | 00 14 02 4b 54 68 65 20 |........|...KThe |
|00000fd0| 61 6e 73 77 65 72 2c 20 | 6c 6f 67 69 63 61 6c 6c |answer, |logicall|
|00000fe0| 79 20 65 6e 6f 75 67 68 | 2c 20 69 73 20 74 68 61 |y enough|, is tha|
|00000ff0| 74 20 69 74 20 75 73 65 | 73 20 61 6e 6f 74 68 65 |t it use|s anothe|
|00001000| 72 20 72 65 67 69 73 74 | 65 72 20 66 6f 72 20 74 |r regist|er for t|
|00001010| 68 69 73 20 70 75 72 70 | 6f 73 65 2e 20 20 57 68 |his purp|ose. Wh|
|00001020| 65 6e 20 4e 65 73 74 65 | 64 43 61 6c 6c 42 61 63 |en Neste|dCallBac|
|00001030| 6b 20 69 73 20 63 61 6c | 6c 65 64 20 66 72 6f 6d |k is cal|led from|
|00001040| 20 69 74 73 20 68 6f 73 | 74 20 70 72 6f 63 65 64 | its hos|t proced|
|00001050| 75 72 65 2c 20 74 68 65 | 20 68 6f 73 74 d5 73 20 |ure, the| host.s |
|00001060| 41 36 20 69 73 20 70 75 | 73 68 65 64 20 6f 6e 74 |A6 is pu|shed ont|
|00001070| 6f 20 74 68 65 20 73 74 | 61 63 6b 20 61 66 74 65 |o the st|ack afte|
|00001080| 72 20 61 6e 79 20 61 6e | 64 20 61 6c 6c 20 66 6f |r any an|d all fo|
|00001090| 72 6d 61 6c 20 70 61 72 | 61 6d 65 74 65 72 73 20 |rmal par|ameters |
|000010a0| 68 61 76 65 20 62 65 65 | 6e 20 70 75 73 68 65 64 |have bee|n pushed|
|000010b0| 20 6f 6e 2c 20 62 75 74 | 20 62 65 66 6f 72 65 20 | on, but| before |
|000010c0| 74 68 65 20 4a 53 52 20 | 69 73 20 70 65 72 66 6f |the JSR |is perfo|
|000010d0| 72 6d 65 64 20 28 74 68 | 69 73 20 65 78 74 72 61 |rmed (th|is extra|
|000010e0| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 6f 66 | paramet|er is of|
|000010f0| 74 65 6e 20 72 65 66 65 | 72 72 65 64 20 74 6f 20 |ten refe|rred to |
|00001100| 61 73 20 74 68 65 20 d2 | 73 74 61 74 69 63 20 6c |as the .|static l|
|00001110| 69 6e 6b d3 29 2e 20 20 | 41 73 20 4e 65 73 74 65 |ink.). |As Neste|
|00001120| 64 43 61 6c 6c 42 61 63 | 6b 20 69 73 20 62 65 69 |dCallBac|k is bei|
|00001130| 6e 67 20 65 6e 74 65 72 | 65 64 2c 20 79 6f 75 20 |ng enter|ed, you |
|00001140| 68 61 76 65 20 61 20 73 | 74 61 63 6b 20 73 69 6d |have a s|tack sim|
|00001150| 69 6c 61 72 20 74 6f 20 | 74 68 61 74 20 69 6e 20 |ilar to |that in |
|00001160| 46 69 67 75 72 65 20 31 | 2e 20 20 42 79 20 63 6f |Figure 1|. By co|
|00001170| 6d 70 61 72 69 73 6f 6e | 2c 20 46 69 67 75 72 65 |mparison|, Figure|
|00001180| 20 32 20 73 68 6f 77 73 | 20 77 68 61 74 20 74 68 | 2 shows| what th|
|00001190| 65 20 73 74 61 63 6b 20 | 77 6f 75 6c 64 20 6c 6f |e stack |would lo|
|000011a0| 6f 6b 20 6c 69 6b 65 20 | 69 66 20 79 6f 75 20 6d |ok like |if you m|
|000011b0| 61 64 65 20 61 20 6e 6f | 72 6d 61 6c 20 63 61 6c |ade a no|rmal cal|
|000011c0| 6c 20 74 6f 20 61 20 70 | 72 6f 63 65 64 75 72 65 |l to a p|rocedure|
|000011d0| 20 6f 6e 20 74 68 65 20 | 6f 75 74 65 72 20 6c 65 | on the |outer le|
|000011e0| 76 65 6c 2c 20 73 75 63 | 68 20 61 73 20 74 68 65 |vel, suc|h as the|
|000011f0| 20 70 72 6f 63 65 64 75 | 72 65 20 73 68 6f 77 6e | procedu|re shown|
|00001200| 20 61 62 6f 76 65 20 6e | 61 6d 65 64 20 43 61 6c | above n|amed Cal|
|00001210| 6c 42 61 63 6b 2e 0d ff | 00 42 00 00 0c 00 00 14 |lBack...|.B......|
|00001220| 00 57 0c 00 00 16 00 65 | 0c 00 00 14 00 94 0c 00 |.W.....e|........|
|00001230| 00 16 00 96 0c 00 00 14 | 00 f8 0c 00 00 16 00 fb |........|........|
|00001240| 0c 00 00 14 01 4f 0c 00 | 00 16 01 5d 0c 00 00 14 |.....O..|...]....|
|00001250| 02 41 0c 00 00 16 02 49 | 0c 00 00 14 00 20 20 20 |.A.....I|..... |
|00001260| 50 52 4f 43 45 44 55 52 | 45 20 4d 79 43 61 6c 6c |PROCEDUR|E MyCall|
|00001270| 69 6e 67 50 72 6f 63 65 | 64 75 72 65 3b 0d 00 06 |ingProce|dure;...|
|00001280| 00 00 09 00 00 16 00 54 | 20 20 50 52 4f 43 45 44 |.......T| PROCED|
|00001290| 55 52 45 20 53 6f 6d 65 | 50 72 6f 63 65 64 75 72 |URE Some|Procedur|
|000012a0| 65 28 50 52 4f 43 45 44 | 55 52 45 20 43 61 6c 6c |e(PROCED|URE Call|
|000012b0| 42 61 63 6b 50 72 6f 63 | 28 69 3a 69 6e 74 65 67 |BackProc|(i:integ|
|000012c0| 65 72 29 3b 20 69 74 65 | 72 46 6f 72 77 61 72 64 |er); ite|rForward|
|000012d0| 3a 20 42 4f 4f 4c 45 41 | 4e 29 3b 0d 00 06 00 00 |: BOOLEA|N);.....|
|000012e0| 09 00 00 16 00 2b f4 85 | f7 70 f5 06 8c 6a 0f 49 |.....+..|.p...j.I|
|000012f0| f6 de a1 f6 d1 32 80 f5 | 0f 52 f4 ff 43 f4 5f 44 |.....2..|.R..C._D|
|00001300| f5 5f 52 f4 50 f5 06 46 | f6 d1 21 48 f0 d0 00 06 |._R.P..F|..!H....|
|00001310| 00 00 0e 01 00 14 00 1d | 00 00 f4 5f 4e f4 4f 3b |........|..._N.O;|
|00001320| 0f 7b f4 36 aa 73 f6 7f | 50 45 c1 9f 75 41 0f 7d |.{.6.s..|PE..uA.}|
|00001330| f0 d0 00 06 00 00 09 00 | 00 16 00 3f 00 f5 0f 52 |........|...?...R|
|00001340| f4 ff 43 f4 5f 44 f5 5f | 52 f4 50 f4 36 aa f4 26 |..C._D._|R.P.6..&|
|00001350| cf 6b f3 b0 00 00 00 00 | 00 00 00 0f 7b 0f 4f f7 |.k......|....{.O.|
|00001360| 52 14 0a 1f 76 1a 0e 45 | c1 9f 75 41 0f 7d f0 d0 |R...v..E|..uA.}..|
|00001370| 00 06 00 00 09 00 00 16 | 00 88 f5 4b 78 0f 54 1c |........|...Kx.T.|
|00001380| b3 7c 6a 0f 4e 52 10 26 | af 6b 80 6f 62 5f 75 20 |.|j.NR.&|.k.ob_u |
|00001390| 31 82 19 0e 45 c1 9f 75 | 41 80 63 90 f5 0f 52 f4 |1...E..u|A.c...R.|
|000013a0| ff 43 f4 5f 44 f5 5f 52 | f4 50 e6 46 f6 d1 21 48 |.C._D._R|.P.F..!H|
|000013b0| 07 30 f5 06 8c 6a 06 39 | 0f 77 b6 20 25 09 50 f7 |.0...j.9|.w. %.P.|
|000013c0| 7b 13 0c 53 f7 61 42 73 | f6 70 2b 1f 6d 07 32 50 |{..S.aBs|.p+.m.2P|
|000013d0| f4 30 54 0f 43 f2 bf 2b | f2 ef 0d 00 00 12 00 00 |.0T.C..+|........|
|000013e0| 0c 00 00 14 00 36 0c 00 | 00 16 00 3f 0c 00 00 14 |.....6..|...?....|
|000013f0| 00 3f 01 dd 03 00 00 00 | 00 09 02 07 02 07 02 07 |.?......|........|
|00001400| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00001410| 02 10 00 09 01 dd 00 00 | 00 00 00 09 02 07 02 07 |........|........|
|00001420| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00001430| 02 10 02 10 00 00 00 09 | 00 55 01 dd 01 2e 00 07 |........|.U......|
|00001440| 00 07 00 5c 01 ec 11 01 | a0 00 82 a0 00 8c a0 00 |...\....|........|
|00001450| 8c a1 00 96 00 06 05 00 | 00 00 02 4d a1 00 9a 00 |........|...M....|
|00001460| 08 00 06 00 00 00 51 00 | 00 a0 00 98 01 00 0a 00 |......Q.|........|
|00001470| 07 00 07 00 5c 01 ec 03 | 00 14 0d 00 18 2b 0e 1d |....\...|.....+..|
|00001480| 0a 4d 61 63 69 6e 74 6f | 73 68 0d a0 00 99 a1 00 |.Macinto|sh......|
|00001490| 9a 00 08 ff ee 00 00 00 | 51 00 00 a0 00 98 2a 18 |........|Q.....*.|
|000014a0| 0f 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 73 |.Technic|al Notes|
|000014b0| a0 00 99 a0 00 97 a1 00 | 96 00 06 05 00 00 00 02 |........|........|
|000014c0| 4d a1 00 9a 00 08 ff fc | 00 00 00 6c 00 00 a0 00 |M.......|...l....|
|000014d0| 98 0d 00 12 2b f1 1f 1b | 44 65 76 65 6c 6f 70 65 |....+...|Develope|
|000014e0| 72 20 54 65 63 68 6e 69 | 63 61 6c 20 53 75 70 70 |r Techni|cal Supp|
|000014f0| 6f 72 74 a0 00 99 a0 00 | 97 07 00 02 00 02 20 00 |ort.....|...... .|
|00001500| 3f 00 09 00 3f 01 d9 a0 | 00 8d a0 00 8c a1 00 96 |?...?...|........|
|00001510| 00 06 05 00 00 00 02 4d | a1 00 9a 00 08 ff ef 00 |.......M|........|
|00001520| 00 00 1b 00 00 a0 00 98 | 0d 00 30 28 00 37 01 b2 |........|..0(.7..|
|00001530| 01 f0 a0 00 99 a0 00 97 | a1 00 96 00 06 05 00 00 |........|........|
|00001540| 00 02 4d a1 00 9a 00 08 | ff fe 00 00 00 06 00 00 |..M.....|........|
|00001550| a0 00 98 0d 00 09 29 22 | 01 a8 a0 00 99 a0 00 97 |......)"|........|
|00001560| a0 00 8d a0 00 8d a0 00 | 83 ff 00 09 20 20 20 20 |........|.... |
|00001570| 45 4e 44 3b 0d 00 00 06 | 00 00 09 00 00 16 00 51 |END;....|.......Q|
|00001580| 01 e1 03 01 00 00 00 09 | 01 8c 02 0b 02 0b 02 0b |........|........|
|00001590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015a0| 00 01 0d 16 00 06 00 00 | 0c 00 00 14 00 09 20 20 |........|...... |
|000015b0| 20 20 45 4e 44 3b 0d ff | 00 06 00 00 09 00 00 16 | END;..|........|
|000015c0| 00 09 01 dd 03 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|000015d0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000015e0| 02 10 00 01 0d 2b 00 06 | 00 00 0c 00 00 14 00 01 |.....+..|........|
|000015f0| 0d 00 00 06 00 00 0c 00 | 00 14 00 01 0d 2e 00 06 |........|........|
|00001600| 00 00 0c 00 00 14 00 01 | 0d d1 00 06 00 00 0c 00 |........|........|
|00001610| 00 14 00 1a 00 00 f5 4f | 4d f7 9f 41 ee a7 c6 27 |.......O|M..A...'|
|00001620| 53 0f 2a 81 ad f3 bf 0d | 00 06 00 00 09 00 00 16 |S.*.....|........|
|00001630| 00 09 01 dd 03 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|00001640| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00001650| 02 10 00 09 01 dd 00 00 | 00 00 00 09 02 07 02 07 |........|........|
|00001660| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00001670| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 00 09 |........|........|
|00001680| 01 dd 03 00 00 00 00 09 | 02 07 02 07 02 10 02 10 |........|........|
|00001690| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000016a0| 00 09 01 dd 00 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|000016b0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000016c0| 02 10 00 01 0d 03 00 06 | 00 00 0c 00 00 14 00 01 |........|........|
|000016d0| 0d 01 00 06 00 00 0c 00 | 00 14 00 06 00 00 0c 00 |........|........|
|000016e0| 00 14 02 62 45 61 63 68 | 20 70 72 6f 63 65 64 75 |...bEach| procedu|
|000016f0| 72 65 20 6b 6e 6f 77 73 | 20 61 74 20 63 6f 6d 70 |re knows| at comp|
|00001700| 69 6c 65 20 74 69 6d 65 | 20 77 68 65 74 68 65 72 |ile time| whether|
|00001710| 20 69 74 20 69 73 20 6e | 65 73 74 65 64 20 6f 72 | it is n|ested or|
|00001720| 20 6e 6f 74 20 61 6e 64 | 20 61 64 6a 75 73 74 73 | not and| adjusts|
|00001730| 20 69 74 73 65 6c 66 20 | 61 63 63 6f 72 64 69 6e | itself |accordin|
|00001740| 67 6c 79 2e 20 20 49 66 | 20 69 74 20 74 75 72 6e |gly. If| it turn|
|00001750| 73 20 6f 75 74 20 74 68 | 61 74 20 61 20 70 72 6f |s out th|at a pro|
|00001760| 63 65 64 75 72 65 20 69 | 73 20 6e 65 73 74 65 64 |cedure i|s nested|
|00001770| 2c 20 74 68 65 6e 20 69 | 74 20 69 73 20 63 6f 6d |, then i|t is com|
|00001780| 70 69 6c 65 64 20 61 73 | 20 69 66 20 79 6f 75 20 |piled as| if you |
|00001790| 68 61 64 20 64 65 63 6c | 61 72 65 64 20 61 6e 20 |had decl|ared an |
|000017a0| 65 78 74 72 61 20 70 61 | 72 61 6d 65 74 65 72 20 |extra pa|rameter |
|000017b0| 61 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |at the e|nd of th|
|000017c0| 65 20 66 6f 72 6d 61 6c | 20 70 61 72 61 6d 65 74 |e formal| paramet|
|000017d0| 65 72 20 6c 69 73 74 2c | 20 6f 6e 65 20 74 68 61 |er list,| one tha|
|000017e0| 74 20 68 65 6c 64 20 74 | 68 65 20 76 61 6c 75 65 |t held t|he value|
|000017f0| 20 6f 66 20 74 68 65 20 | 68 6f 73 74 d5 73 20 41 | of the |host.s A|
|00001800| 36 2e 20 20 50 61 73 63 | 61 6c 20 74 68 65 6e 20 |6. Pasc|al then |
|00001810| 75 73 65 73 20 74 68 69 | 73 20 70 61 72 61 6d 65 |uses thi|s parame|
|00001820| 74 65 72 20 66 6f 72 20 | 66 65 74 63 68 69 6e 67 |ter for |fetching|
|00001830| 20 74 68 65 20 6c 6f 63 | 61 6c 20 76 61 72 69 61 | the loc|al varia|
|00001840| 62 6c 65 73 20 6f 66 20 | 74 68 65 20 6e 65 73 74 |bles of |the nest|
|00001850| 65 64 20 70 72 6f 63 65 | 64 75 72 65 d5 73 20 68 |ed proce|dure.s h|
|00001860| 6f 73 74 2e 20 20 49 74 | 20 70 75 6c 6c 73 20 74 |ost. It| pulls t|
|00001870| 68 69 73 20 70 61 72 61 | 6d 65 74 65 72 20 6f 66 |his para|meter of|
|00001880| 66 20 6f 66 20 74 68 65 | 20 73 74 61 63 6b 20 6a |f of the| stack j|
|00001890| 75 73 74 20 6c 69 6b 65 | 20 61 6e 79 20 6f 74 68 |ust like| any oth|
|000018a0| 65 72 20 70 61 72 61 6d | 65 74 65 72 2c 20 73 74 |er param|eter, st|
|000018b0| 69 63 6b 73 20 69 74 20 | 69 6e 74 6f 20 61 20 68 |icks it |into a h|
|000018c0| 61 6e 64 79 20 72 65 67 | 69 73 74 65 72 2c 20 61 |andy reg|ister, a|
|000018d0| 6e 64 20 75 73 65 73 20 | 69 74 20 61 73 20 61 20 |nd uses |it as a |
|000018e0| 62 61 73 65 20 61 64 64 | 72 65 73 73 20 74 6f 20 |base add|ress to |
|000018f0| 74 68 65 20 68 6f 73 74 | d5 73 20 6c 6f 63 61 6c |the host|.s local|
|00001900| 20 76 61 72 69 61 62 6c | 65 73 2c 20 6a 75 73 74 | variabl|es, just|
|00001910| 20 61 73 20 69 74 20 75 | 73 65 73 20 41 36 20 61 | as it u|ses A6 a|
|00001920| 73 20 74 68 65 20 62 61 | 73 65 20 61 64 64 72 65 |s the ba|se addre|
|00001930| 73 73 20 74 6f 20 69 74 | 73 20 6f 77 6e 20 6c 6f |ss to it|s own lo|
|00001940| 63 61 6c 73 2e 0d 00 1e | 00 00 0c 00 00 14 01 1b |cals....|........|
|00001950| 0c 00 00 16 01 1d 0c 00 | 00 14 02 38 0c 00 00 16 |........|...8....|
|00001960| 02 3a 0c 00 00 14 00 01 | 0d 06 00 06 00 00 0c 00 |.:......|........|
|00001970| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 00 3e |........|.......>|
|00001980| f4 67 f6 7f 75 41 0f 31 | fd 0f 43 6a a0 25 0f 4e |.g..uA.1|..Cj.%.N|
|00001990| 18 21 9f 43 6a af 42 6c | f6 b0 0f 26 00 f4 67 f6 |.!.Cj.Bl|...&..g.|
|000019a0| 7f 75 41 0f 32 fd 0f 43 | 6a a0 25 0f 43 6a af 42 |.uA.2..C|j.%.Cj.B|
|000019b0| 6c f6 bf 0d 00 06 00 00 | 0c 01 00 14 00 01 0d 01 |l.......|........|
|000019c0| 00 06 00 00 0c 00 00 14 | 00 2d 01 b9 03 00 00 00 |........|.-......|
|000019d0| 00 1b 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000019e0| 02 10 02 10 02 10 02 10 | 02 10 00 01 0d 00 00 06 |........|........|
|000019f0| 00 00 0c 00 00 14 00 00 | 00 01 0d 00 00 06 00 00 |........|........|
|00001a00| 0c 00 00 14 01 29 41 73 | 20 73 65 65 6e 20 69 6e |.....)As| seen in|
|00001a10| 20 74 68 65 20 70 72 65 | 76 69 6f 75 73 20 73 65 | the pre|vious se|
|00001a20| 63 74 69 6f 6e 2c 20 6e | 65 73 74 65 64 20 70 72 |ction, n|ested pr|
|00001a30| 6f 63 65 64 75 72 65 73 | 20 72 65 71 75 69 72 65 |ocedures| require|
|00001a40| 20 61 20 6c 69 74 74 6c | 65 20 68 65 6c 70 20 74 | a littl|e help t|
|00001a50| 6f 20 67 65 74 20 74 68 | 65 6d 73 65 6c 76 65 73 |o get th|emselves|
|00001a60| 20 75 70 20 61 6e 64 20 | 72 75 6e 6e 69 6e 67 2e | up and |running.|
|00001a70| 20 20 53 70 65 63 69 66 | 69 63 61 6c 6c 79 2c 20 | Specif|ically, |
|00001a80| 74 68 65 79 20 6e 65 65 | 64 20 61 6e 20 65 78 74 |they nee|d an ext|
|00001a90| 72 61 20 70 61 72 61 6d | 65 74 65 72 20 63 61 6c |ra param|eter cal|
|00001aa0| 6c 65 64 20 61 20 73 74 | 61 74 69 63 20 6c 69 6e |led a st|atic lin|
|00001ab0| 6b 2e 20 20 59 6f 75 d5 | 76 65 20 73 65 65 6e 20 |k. You.|ve seen |
|00001ac0| 6f 6e 65 20 77 61 79 20 | 69 6e 20 77 68 69 63 68 |one way |in which|
|00001ad0| 20 50 61 73 63 61 6c 20 | 70 72 6f 76 69 64 65 73 | Pascal |provides|
|00001ae0| 20 73 75 70 70 6f 72 74 | 20 66 6f 72 20 74 68 69 | support| for thi|
|00001af0| 73 20 70 61 72 61 6d 65 | 74 65 72 2e 20 20 49 6e |s parame|ter. In|
|00001b00| 20 74 68 69 73 20 73 65 | 63 74 69 6f 6e 2c 20 79 | this se|ction, y|
|00001b10| 6f 75 20 73 65 65 20 61 | 6e 6f 74 68 65 72 20 69 |ou see a|nother i|
|00001b20| 6d 70 6f 72 74 61 6e 74 | 20 63 61 73 65 2e 0d 00 |mportant| case...|
|00001b30| 00 06 00 00 0c 00 00 14 | 00 01 0d 00 00 06 00 00 |........|........|
|00001b40| 0c 00 00 14 01 97 54 68 | 65 72 65 20 61 72 65 20 |......Th|ere are |
|00001b50| 6d 61 6e 79 20 54 6f 6f | 6c 62 6f 78 20 72 6f 75 |many Too|lbox rou|
|00001b60| 74 69 6e 65 73 20 74 68 | 61 74 20 72 65 71 75 69 |tines th|at requi|
|00001b70| 72 65 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |re a poi|nter to |
|00001b80| 61 20 70 72 6f 63 65 64 | 75 72 65 20 62 65 69 6e |a proced|ure bein|
|00001b90| 67 20 70 61 73 73 65 64 | 20 74 6f 20 74 68 65 6d |g passed| to them|
|00001ba0| 20 61 73 20 61 20 70 61 | 72 61 6d 65 74 65 72 2e | as a pa|rameter.|
|00001bb0| 20 20 54 68 65 73 65 20 | 70 72 6f 63 65 64 75 72 | These |procedur|
|00001bc0| 65 73 20 61 72 65 20 63 | 61 6c 6c 65 64 20 d2 63 |es are c|alled .c|
|00001bd0| 61 6c 6c 62 61 63 6b d3 | 20 70 72 6f 63 65 64 75 |allback.| procedu|
|00001be0| 72 65 73 2c 20 62 65 63 | 61 75 73 65 20 74 68 65 |res, bec|ause the|
|00001bf0| 20 54 6f 6f 6c 62 6f 78 | 20 6d 61 6b 65 73 20 61 | Toolbox| makes a|
|00001c00| 20 63 61 6c 6c 20 62 61 | 63 6b 20 74 6f 20 74 68 | call ba|ck to th|
|00001c10| 6f 73 65 20 70 72 6f 63 | 65 64 75 72 65 73 20 74 |ose proc|edures t|
|00001c20| 6f 20 70 65 72 66 6f 72 | 6d 20 73 6f 6d 65 20 61 |o perfor|m some a|
|00001c30| 70 70 6c 69 63 61 74 69 | 6f 6e 2d 73 70 65 63 69 |pplicati|on-speci|
|00001c40| 66 69 63 20 66 75 6e 63 | 74 69 6f 6e 2e 20 20 41 |fic func|tion. A|
|00001c50| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 74 68 69 |n exampl|e of thi|
|00001c60| 73 20 74 79 70 65 20 6f | 66 20 72 6f 75 74 69 6e |s type o|f routin|
|00001c70| 65 20 77 6f 75 6c 64 20 | 62 65 20 74 68 65 20 43 |e would |be the C|
|00001c80| 6f 6e 74 72 6f 6c 20 4d | 61 6e 61 67 65 72 20 72 |ontrol M|anager r|
|00001c90| 6f 75 74 69 6e 65 20 5f | 54 72 61 63 6b 43 6f 6e |outine _|TrackCon|
|00001ca0| 74 72 6f 6c 2c 20 77 68 | 69 63 68 20 72 65 71 75 |trol, wh|ich requ|
|00001cb0| 69 72 65 73 20 61 20 63 | 61 6c 6c 62 61 63 6b 20 |ires a c|allback |
|00001cc0| 70 72 6f 63 65 64 75 72 | 65 20 63 61 6c 6c 65 64 |procedur|e called|
|00001cd0| 20 61 63 74 69 6f 6e 50 | 72 6f 63 2e 0d ff 00 1e | actionP|roc.....|
|00001ce0| 00 00 0c 00 00 14 01 51 | 0c 00 00 16 01 5e 0c 00 |.......Q|.....^..|
|00001cf0| 00 14 01 8b 0c 00 00 16 | 01 95 0c 00 00 14 00 01 |........|........|
|00001d00| 0d 01 00 06 00 00 0c 00 | 00 14 01 4f 42 79 20 6e |........|...OBy n|
|00001d10| 6f 77 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 73 |ow, you |should s|
|00001d20| 65 65 20 77 68 79 20 79 | 6f 75 20 63 61 6e 6e 6f |ee why y|ou canno|
|00001d30| 74 20 70 61 73 73 20 74 | 68 65 20 61 64 64 72 65 |t pass t|he addre|
|00001d40| 73 73 20 6f 66 20 61 20 | 6e 65 73 74 65 64 20 70 |ss of a |nested p|
|00001d50| 72 6f 63 65 64 75 72 65 | 20 74 6f 20 73 75 63 68 |rocedure| to such|
|00001d60| 20 61 20 54 6f 6f 6c 62 | 6f 78 20 72 6f 75 74 69 | a Toolb|ox routi|
|00001d70| 6e 65 2e 20 20 4e 65 73 | 74 65 64 20 70 72 6f 63 |ne. Nes|ted proc|
|00001d80| 65 64 75 72 65 73 20 72 | 65 71 75 69 72 65 20 74 |edures r|equire t|
|00001d90| 68 61 74 20 74 68 65 79 | 20 62 65 20 70 61 73 73 |hat they| be pass|
|00001da0| 65 64 20 74 68 65 20 73 | 74 61 74 69 63 20 6c 69 |ed the s|tatic li|
|00001db0| 6e 6b 20 70 61 72 61 6d | 65 74 65 72 20 73 6f 20 |nk param|eter so |
|00001dc0| 74 68 61 74 20 74 68 65 | 79 20 63 61 6e 20 61 63 |that the|y can ac|
|00001dd0| 63 65 73 73 20 74 68 65 | 69 72 20 68 6f 73 74 20 |cess the|ir host |
|00001de0| 76 61 72 69 61 62 6c 65 | 73 2e 20 20 54 68 65 20 |variable|s. The |
|00001df0| 54 6f 6f 6c 62 6f 78 20 | 64 6f 65 73 6e d5 74 20 |Toolbox |doesn.t |
|00001e00| 73 75 70 70 6f 72 74 20 | 74 68 69 73 20 63 6f 6e |support |this con|
|00001e10| 76 65 6e 74 69 6f 6e 2c | 20 73 6f 20 69 74 20 63 |vention,| so it c|
|00001e20| 61 6e 6e 6f 74 20 70 61 | 73 73 20 74 68 65 20 72 |annot pa|ss the r|
|00001e30| 65 71 75 69 72 65 64 20 | 73 74 61 74 69 63 20 6c |equired |static l|
|00001e40| 69 6e 6b 20 74 6f 20 74 | 68 65 20 6e 65 73 74 65 |ink to t|he neste|
|00001e50| 64 20 72 6f 75 74 69 6e | 65 2e 0d ff 00 06 00 00 |d routin|e.......|
|00001e60| 0c 00 00 14 00 01 0d ff | 00 06 00 00 0c 00 00 14 |........|........|
|00001e70| 01 84 57 68 69 6c 65 20 | 74 68 65 20 54 6f 6f 6c |..While |the Tool|
|00001e80| 62 6f 78 20 64 6f 65 73 | 6e d5 74 20 73 75 70 70 |box does|n.t supp|
|00001e90| 6f 72 74 20 74 68 65 20 | 6e 65 73 74 65 64 20 70 |ort the |nested p|
|00001ea0| 72 6f 63 65 64 75 72 65 | 20 63 6f 6e 76 65 6e 74 |rocedure| convent|
|00001eb0| 69 6f 6e 2c 20 50 61 73 | 63 61 6c 20 69 74 73 65 |ion, Pas|cal itse|
|00001ec0| 6c 66 20 64 6f 65 73 20 | 73 75 70 70 6f 72 74 20 |lf does |support |
|00001ed0| 61 20 6d 65 74 68 6f 64 | 20 77 68 65 72 65 62 79 |a method| whereby|
|00001ee0| 20 79 6f 75 20 63 61 6e | 20 70 61 73 73 20 61 72 | you can| pass ar|
|00001ef0| 6f 75 6e 64 20 61 6c 6c | 20 74 68 65 20 69 6e 66 |ound all| the inf|
|00001f00| 6f 72 6d 61 74 69 6f 6e | 20 6e 65 63 65 73 73 61 |ormation| necessa|
|00001f10| 72 79 20 74 6f 20 69 6d | 70 6c 65 6d 65 6e 74 20 |ry to im|plement |
|00001f20| 61 20 63 61 6c 6c 62 61 | 63 6b 20 70 72 6f 63 65 |a callba|ck proce|
|00001f30| 64 75 72 65 20 61 73 20 | 61 20 6e 65 73 74 65 64 |dure as |a nested|
|00001f40| 20 70 72 6f 63 65 64 75 | 72 65 2e 20 20 53 79 6e | procedu|re. Syn|
|00001f50| 74 61 63 74 69 63 61 6c | 6c 79 2c 20 74 68 69 73 |tactical|ly, this|
|00001f60| 20 69 73 20 64 6f 6e 65 | 20 62 79 20 69 6e 63 6c | is done| by incl|
|00001f70| 75 64 69 6e 67 20 61 20 | 66 75 6c 6c 20 70 72 6f |uding a |full pro|
|00001f80| 63 65 64 75 72 65 20 68 | 65 61 64 69 6e 67 20 69 |cedure h|eading i|
|00001f90| 6e 20 74 68 65 20 6c 69 | 73 74 20 6f 66 20 66 6f |n the li|st of fo|
|00001fa0| 72 6d 61 6c 20 70 61 72 | 61 6d 65 74 65 72 73 20 |rmal par|ameters |
|00001fb0| 61 20 70 72 6f 63 65 64 | 75 72 65 20 74 61 6b 65 |a proced|ure take|
|00001fc0| 73 2e 20 20 41 6e 20 65 | 78 61 6d 70 6c 65 20 6f |s. An e|xample o|
|00001fd0| 66 20 73 75 63 68 20 63 | 6f 75 6c 64 20 6c 6f 6f |f such c|ould loo|
|00001fe0| 6b 20 6c 69 6b 65 20 74 | 68 65 20 66 6f 6c 6c 6f |k like t|he follo|
|00001ff0| 77 69 6e 67 3a 0d 00 06 | 00 00 0c 00 00 14 00 09 |wing:...|........|
|00002000| 01 dd 03 00 00 00 00 09 | 02 07 02 07 02 10 02 10 |........|........|
|00002010| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002020| 00 09 01 dd 03 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|00002030| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002040| 02 10 00 09 01 dd 03 00 | 00 00 00 09 02 07 02 07 |........|........|
|00002050| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002060| 02 10 02 10 00 00 ff d6 | 00 3c 03 be 00 0d 4d 41 |........|.<....MA|
|00002070| 47 49 43 50 49 43 11 01 | ff 69 00 01 0d 00 00 06 |GICPIC..|.i......|
|00002080| 00 00 0c 00 00 14 09 00 | 00 16 00 0a 20 20 20 20 |........|.... |
|00002090| 42 45 47 49 4e 0d 00 06 | 00 00 09 00 00 16 00 0a |BEGIN...|........|
|000020a0| 20 20 20 20 20 20 2e 2e | 2e 0d 00 06 00 00 09 00 | ..|........|
|000020b0| 00 16 00 17 20 20 20 20 | 20 20 43 61 6c 6c 42 61 |.... | CallBa|
|000020c0| 63 6b 50 72 6f 63 28 35 | 29 3b 0d ff 00 06 00 00 |ckProc(5|);......|
|000020d0| 09 00 00 16 00 0a 20 20 | 20 20 20 20 2e 2e 2e 0d |...... | ....|
|000020e0| 00 06 00 00 09 00 00 16 | 00 09 01 dd 03 00 00 00 |........|........|
|000020f0| 00 09 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002100| 02 10 02 10 02 10 02 10 | 02 10 00 01 0d 01 00 06 |........|........|
|00002110| 00 00 0c 00 00 14 00 01 | 0d 00 00 06 00 00 0c 00 |........|........|
|00002120| 00 14 00 06 00 00 0c 00 | 00 14 01 31 53 6f 6d 65 |........|...1Some|
|00002130| 50 72 6f 63 65 64 75 72 | 65 20 74 61 6b 65 73 20 |Procedur|e takes |
|00002140| 74 77 6f 20 70 61 72 61 | 6d 65 74 65 72 73 2e 20 |two para|meters. |
|00002150| 20 54 68 65 20 66 69 72 | 73 74 20 69 73 20 61 20 | The fir|st is a |
|00002160| 50 52 4f 43 45 44 55 52 | 45 20 70 61 72 61 6d 65 |PROCEDUR|E parame|
|00002170| 74 65 72 20 74 68 61 74 | 20 72 65 66 65 72 73 20 |ter that| refers |
|00002180| 74 6f 20 61 20 72 6f 75 | 74 69 6e 65 20 74 68 61 |to a rou|tine tha|
|00002190| 74 20 74 61 6b 65 73 20 | 61 20 70 61 72 61 6d 65 |t takes |a parame|
|000021a0| 74 65 72 20 69 74 73 65 | 6c 66 2c 20 6e 61 6d 65 |ter itse|lf, name|
|000021b0| 6c 79 2c 20 61 20 73 69 | 6e 67 6c 65 20 69 6e 74 |ly, a si|ngle int|
|000021c0| 65 67 65 72 2e 20 20 49 | 6e 20 61 64 64 69 74 69 |eger. I|n additi|
|000021d0| 6f 6e 2c 20 53 6f 6d 65 | 50 72 6f 63 65 64 75 72 |on, Some|Procedur|
|000021e0| 65 20 74 61 6b 65 73 20 | 61 20 42 4f 4f 4c 45 41 |e takes |a BOOLEA|
|000021f0| 4e 20 63 61 6c 6c 65 64 | 20 69 74 65 72 46 6f 72 |N called| iterFor|
|00002200| 77 61 72 64 20 61 73 20 | 61 20 73 65 63 6f 6e 64 |ward as |a second|
|00002210| 20 70 61 72 61 6d 65 74 | 65 72 2e 20 20 59 6f 75 | paramet|er. You|
|00002220| 20 77 6f 75 6c 64 20 63 | 61 6c 6c 20 53 6f 6d 65 | would c|all Some|
|00002230| 50 72 6f 63 65 64 75 72 | 65 20 77 69 74 68 20 73 |Procedur|e with s|
|00002240| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 74 68 |omething| like th|
|00002250| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 3a 0d 2e 00 48 |e follow|ing:...H|
|00002260| 00 00 0c 00 00 16 00 0d | 0c 00 00 14 00 34 0c 00 |........|.....4..|
|00002270| 00 16 00 3d 0c 00 00 14 | 00 a8 0c 00 00 16 00 b5 |...=....|........|
|00002280| 0c 00 00 14 00 be 0c 00 | 00 16 00 c5 0c 00 00 14 |........|........|
|00002290| 00 cd 0c 00 00 16 00 d8 | 0c 00 00 14 01 00 0c 00 |........|........|
|000022a0| 00 16 01 0d 0c 00 00 14 | 00 09 01 dd 00 00 00 00 |........|........|
|000022b0| 00 09 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000022c0| 02 10 02 10 02 10 02 10 | 02 10 00 09 01 dd 03 00 |........|........|
|000022d0| 00 00 00 09 02 07 02 07 | 02 10 02 10 02 10 02 10 |........|........|
|000022e0| 02 10 02 10 02 10 02 10 | 02 10 02 10 00 01 0d ff |........|........|
|000022f0| 00 06 00 00 0c 00 00 14 | 00 06 00 00 09 00 00 16 |........|........|
|00002300| 00 01 0d 6c 00 06 00 00 | 09 00 00 16 00 2f 20 20 |...l....|...../ |
|00002310| 20 20 50 52 4f 43 45 44 | 55 52 45 20 4d 79 43 61 | PROCED|URE MyCa|
|00002320| 6c 6c 42 61 63 6b 50 72 | 6f 63 65 64 75 72 65 28 |llBackPr|ocedure(|
|00002330| 69 3a 20 69 6e 74 65 67 | 65 72 29 3b 0d 00 00 06 |i: integ|er);....|
|00002340| 00 00 09 00 00 16 00 01 | 0d 1d 00 06 00 00 09 00 |........|........|
|00002350| 00 16 00 27 20 20 20 20 | 20 20 42 45 47 49 4e 20 |...' | BEGIN |
|00002360| 7b 20 6f 66 20 4d 79 43 | 61 6c 6c 42 61 63 6b 50 |{ of MyC|allBackP|
|00002370| 72 6f 63 65 64 75 72 65 | 20 7d 0d 8e 00 06 00 00 |rocedure| }......|
|00002380| 09 00 00 16 00 14 20 20 | 20 20 20 20 20 20 3c 20 |...... | < |
|00002390| 6d 75 6d 62 6c 65 20 3e | 3b 0d 00 06 00 00 09 00 |mumble >|;.......|
|000023a0| 00 16 00 0b 20 20 20 20 | 20 20 45 4e 44 3b 0d 00 |.... | END;..|
|000023b0| 00 06 00 00 09 00 00 16 | 00 01 0d 00 00 06 00 00 |........|........|
|000023c0| 09 00 00 16 00 24 20 20 | 20 20 42 45 47 49 4e 20 |.....$ | BEGIN |
|000023d0| 7b 20 6f 66 20 4d 79 43 | 61 6c 6c 69 6e 67 50 72 |{ of MyC|allingPr|
|000023e0| 6f 63 65 64 75 72 65 20 | 7d 0d 00 06 00 00 09 00 |ocedure |}.......|
|000023f0| 00 16 00 30 20 20 20 20 | 20 20 53 6f 6d 65 50 72 |...0 | SomePr|
|00002400| 6f 63 65 64 75 72 65 28 | 4d 79 43 61 6c 6c 42 61 |ocedure(|MyCallBa|
|00002410| 63 6b 50 72 6f 63 65 64 | 75 72 65 2c 20 54 52 55 |ckProced|ure, TRU|
|00002420| 45 29 3b 0d 00 06 00 00 | 09 00 00 16 00 09 01 dd |E);.....|........|
|00002430| 00 00 00 00 00 09 02 07 | 02 07 02 10 02 10 02 10 |........|........|
|00002440| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 00 02 |........|........|
|00002450| 7d 0d 00 06 00 00 09 00 | 00 16 00 01 0d 00 00 06 |}.......|........|
|00002460| 00 00 0c 00 00 14 00 06 | 00 00 0c 00 00 14 01 f6 |........|........|
|00002470| 54 68 72 6f 75 67 68 20 | 74 68 65 20 75 73 65 20 |Through |the use |
|00002480| 6f 66 20 74 68 65 20 50 | 52 4f 43 45 44 55 52 45 |of the P|ROCEDURE|
|00002490| 20 70 61 72 61 6d 65 74 | 65 72 2c 20 79 6f 75 20 | paramet|er, you |
|000024a0| 63 61 6e 20 69 6e 76 6f | 6b 65 20 74 68 65 20 63 |can invo|ke the c|
|000024b0| 61 6c 6c 62 61 63 6b 20 | 70 72 6f 63 65 64 75 72 |allback |procedur|
|000024c0| 65 20 75 73 69 6e 67 20 | 61 20 6e 61 74 75 72 61 |e using |a natura|
|000024d0| 6c 20 50 61 73 63 61 6c | 20 73 79 6e 74 61 78 2e |l Pascal| syntax.|
|000024e0| 20 20 49 6e 20 74 68 65 | 20 53 6f 6d 65 50 72 6f | In the| SomePro|
|000024f0| 63 65 64 75 72 65 20 65 | 78 61 6d 70 6c 65 2c 20 |cedure e|xample, |
|00002500| 74 68 65 20 73 74 61 74 | 65 6d 65 6e 74 20 43 61 |the stat|ement Ca|
|00002510| 6c 6c 42 61 63 6b 50 72 | 6f 63 28 35 29 20 63 61 |llBackPr|oc(5) ca|
|00002520| 75 73 65 73 20 4d 79 43 | 61 6c 6c 42 61 63 6b 50 |uses MyC|allBackP|
|00002530| 72 6f 63 65 64 75 72 65 | 20 74 6f 20 62 65 20 63 |rocedure| to be c|
|00002540| 61 6c 6c 65 64 20 77 69 | 74 68 20 61 20 76 61 6c |alled wi|th a val|
|00002550| 75 65 20 6f 66 20 66 69 | 76 65 2e 20 20 4e 6f 74 |ue of fi|ve. Not|
|00002560| 20 6f 6e 6c 79 20 63 61 | 6e 20 79 6f 75 20 6a 75 | only ca|n you ju|
|00002570| 73 74 20 69 6e 76 6f 6b | 65 20 74 68 65 20 70 72 |st invok|e the pr|
|00002580| 6f 63 65 64 75 72 65 20 | 62 79 20 65 6e 74 65 72 |ocedure |by enter|
|00002590| 69 6e 67 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |ing the |name of |
|000025a0| 74 68 65 20 50 52 4f 43 | 45 44 55 52 45 20 76 61 |the PROC|EDURE va|
|000025b0| 72 69 61 62 6c 65 2c 20 | 62 75 74 20 79 6f 75 20 |riable, |but you |
|000025c0| 63 61 6e 20 70 61 73 73 | 20 70 61 72 61 6d 65 74 |can pass| paramet|
|000025d0| 65 72 73 20 74 6f 20 69 | 74 20 77 69 74 68 20 66 |ers to i|t with f|
|000025e0| 75 6c 6c 20 50 61 73 63 | 61 6c 20 74 79 70 65 63 |ull Pasc|al typec|
|000025f0| 68 65 63 6b 69 6e 67 20 | 69 6e 76 6f 6b 65 64 2e |hecking |invoked.|
|00002600| 20 20 49 6e 20 74 68 69 | 73 20 63 61 73 65 2c 20 | In thi|s case, |
|00002610| 50 61 73 63 61 6c 20 65 | 6e 73 75 72 65 73 20 74 |Pascal e|nsures t|
|00002620| 68 61 74 20 77 68 65 6e | 20 79 6f 75 20 63 61 6c |hat when| you cal|
|00002630| 6c 20 43 61 6c 6c 42 61 | 63 6b 50 72 6f 63 2c 20 |l CallBa|ckProc, |
|00002640| 79 6f 75 20 61 6c 73 6f | 20 70 61 73 73 20 61 20 |you also| pass a |
|00002650| 73 69 6e 67 6c 65 20 69 | 6e 74 65 67 65 72 20 74 |single i|nteger t|
|00002660| 6f 20 69 74 2e 0d 00 4e | 00 00 0c 00 00 14 00 17 |o it...N|........|
|00002670| 0c 00 00 16 00 20 0c 00 | 00 14 00 79 0c 00 00 16 |..... ..|...y....|
|00002680| 00 86 0c 00 00 14 00 9e | 0c 00 00 16 00 ad 0c 00 |........|........|
|00002690| 00 14 00 b5 0c 00 00 16 | 00 c8 0c 00 00 14 01 34 |........|.......4|
|000026a0| 0c 00 00 16 01 3d 0c 00 | 00 14 01 c2 0c 00 00 16 |.....=..|........|
|000026b0| 01 ce 0c 00 00 14 00 01 | 0d 00 00 06 00 00 0c 00 |........|........|
|000026c0| 00 14 01 6b 50 52 4f 43 | 45 44 55 52 45 20 70 61 |...kPROC|EDURE pa|
|000026d0| 72 61 6d 65 74 65 72 73 | 20 61 6c 73 6f 20 67 69 |rameters| also gi|
|000026e0| 76 65 20 74 68 65 20 73 | 75 70 70 6f 72 74 20 66 |ve the s|upport f|
|000026f0| 6f 72 20 6e 65 73 74 65 | 64 20 70 72 6f 63 65 64 |or neste|d proced|
|00002700| 75 72 65 73 20 66 6f 72 | 20 77 68 69 63 68 20 79 |ures for| which y|
|00002710| 6f 75 20 61 72 65 20 6c | 6f 6f 6b 69 6e 67 2e 20 |ou are l|ooking. |
|00002720| 20 57 68 65 6e 20 61 20 | 50 52 4f 43 45 44 55 52 | When a |PROCEDUR|
|00002730| 45 20 70 61 72 61 6d 65 | 74 65 72 20 69 73 20 70 |E parame|ter is p|
|00002740| 61 73 73 65 64 20 6f 6e | 20 74 68 65 20 73 74 61 |assed on| the sta|
|00002750| 63 6b 2c 20 74 77 6f 20 | 63 6f 6d 70 6f 6e 65 6e |ck, two |componen|
|00002760| 74 73 20 61 72 65 20 75 | 73 65 64 20 74 6f 20 72 |ts are u|sed to r|
|00002770| 65 70 72 65 73 65 6e 74 | 20 69 74 2e 20 20 54 68 |epresent| it. Th|
|00002780| 65 20 66 69 72 73 74 20 | 69 73 20 61 20 70 6f 69 |e first |is a poi|
|00002790| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 61 63 74 75 |nter to |the actu|
|000027a0| 61 6c 20 70 72 6f 63 65 | 64 75 72 65 2e 20 20 54 |al proce|dure. T|
|000027b0| 68 65 20 73 65 63 6f 6e | 64 20 69 73 20 74 68 65 |he secon|d is the|
|000027c0| 20 73 74 61 74 69 63 20 | 6c 69 6e 6b 2e 20 20 54 | static |link. T|
|000027d0| 68 65 72 65 66 6f 72 65 | 2c 20 79 6f 75 20 63 61 |herefore|, you ca|
|000027e0| 6e 20 74 68 69 6e 6b 20 | 6f 66 20 61 20 50 52 4f |n think |of a PRO|
|000027f0| 43 45 44 55 52 45 20 70 | 61 72 61 6d 65 74 65 72 |CEDURE p|arameter|
|00002800| 20 61 73 20 62 65 69 6e | 67 20 72 65 70 72 65 73 | as bein|g repres|
|00002810| 65 6e 74 65 64 20 62 79 | 20 74 68 65 20 66 6f 6c |ented by| the fol|
|00002820| 6c 6f 77 69 6e 67 20 72 | 65 63 6f 72 64 3a 0d 00 |lowing r|ecord:..|
|00002830| 00 24 00 00 0c 00 00 16 | 00 09 0c 00 00 14 00 64 |.$......|.......d|
|00002840| 0c 00 00 16 00 6d 0c 00 | 00 14 01 29 0c 00 00 16 |.....m..|...)....|
|00002850| 01 32 0c 00 00 14 00 09 | 01 dd 03 00 00 00 00 09 |.2......|........|
|00002860| 02 07 02 07 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002870| 02 10 02 10 02 10 02 10 | 00 01 0d 02 00 06 00 00 |........|........|
|00002880| 0c 00 00 14 00 01 0d 01 | 00 06 00 00 0c 00 00 14 |........|........|
|00002890| 00 00 09 00 00 16 00 20 | 20 20 20 20 50 72 6f 63 |....... | Proc|
|000028a0| 65 64 75 72 65 50 61 72 | 61 6d 65 74 65 72 20 3d |edurePar|ameter =|
|000028b0| 20 52 45 43 4f 52 44 0d | 00 06 00 00 09 00 00 16 | RECORD.|........|
|000028c0| 00 14 20 20 20 20 20 20 | 70 72 6f 63 50 74 72 3a |.. |procPtr:|
|000028d0| 20 50 74 72 3b 0d 00 06 | 00 00 09 00 00 16 00 17 | Ptr;...|........|
|000028e0| 20 20 20 20 20 20 73 74 | 61 74 69 63 4c 69 6e 6b | st|aticLink|
|000028f0| 3a 20 50 74 72 3b 0d 18 | 00 06 00 00 09 00 00 16 |: Ptr;..|........|
|00002900| 00 09 01 dd 00 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|00002910| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00002920| 02 10 00 02 7d 0d 00 06 | 00 00 09 00 00 16 00 01 |....}...|........|
|00002930| 0d 00 00 06 00 00 0c 00 | 00 14 00 06 00 00 0c 00 |........|........|
|00002940| 00 14 01 75 57 68 65 6e | 20 79 6f 75 20 70 61 73 |...uWhen| you pas|
|00002950| 73 20 61 20 50 52 4f 43 | 45 44 55 52 45 20 70 61 |s a PROC|EDURE pa|
|00002960| 72 61 6d 65 74 65 72 20 | 74 6f 20 61 20 64 65 73 |rameter |to a des|
|00002970| 74 69 6e 61 74 69 6f 6e | 20 70 72 6f 63 65 64 75 |tination| procedu|
|00002980| 72 65 2c 20 62 6f 74 68 | 20 6f 66 20 74 68 65 73 |re, both| of thes|
|00002990| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 61 72 65 |e compon|ents are|
|000029a0| 20 70 75 73 68 65 64 20 | 6f 6e 74 6f 20 74 68 65 | pushed |onto the|
|000029b0| 20 73 74 61 63 6b 20 61 | 73 20 4c 4f 4e 47 20 76 | stack a|s LONG v|
|000029c0| 61 6c 75 65 73 20 28 66 | 6f 75 72 20 62 79 74 65 |alues (f|our byte|
|000029d0| 73 20 65 61 63 68 29 2e | 20 20 57 68 65 6e 20 69 |s each).| When i|
|000029e0| 74 20 63 6f 6d 65 73 20 | 74 69 6d 65 20 66 6f 72 |t comes |time for|
|000029f0| 20 74 68 65 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | the des|tination|
|00002a00| 20 70 72 6f 63 65 64 75 | 72 65 20 74 6f 20 69 6e | procedu|re to in|
|00002a10| 76 6f 6b 65 20 74 68 65 | 20 63 61 6c 6c 62 61 63 |voke the| callbac|
|00002a20| 6b 2c 20 61 6e 79 20 6e | 65 63 65 73 73 61 72 79 |k, any n|ecessary|
|00002a30| 20 70 61 72 61 6d 65 74 | 65 72 73 20 66 6f 72 20 | paramet|ers for |
|00002a40| 74 68 65 20 63 61 6c 6c | 62 61 63 6b 20 61 72 65 |the call|back are|
|00002a50| 20 70 6c 61 63 65 64 20 | 6f 6e 74 6f 20 74 68 65 | placed |onto the|
|00002a60| 20 73 74 61 63 6b 2c 20 | 66 6f 6c 6c 6f 77 65 64 | stack, |followed|
|00002a70| 20 62 79 20 74 68 65 20 | 73 74 61 74 69 63 4c 69 | by the |staticLi|
|00002a80| 6e 6b 20 76 61 6c 75 65 | 2e 20 20 54 68 65 6e 20 |nk value|. Then |
|00002a90| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 73 70 65 63 |the rout|ine spec|
|00002aa0| 69 66 69 65 64 20 62 79 | 20 70 72 6f 63 50 74 72 |ified by| procPtr|
|00002ab0| 20 63 61 6c 6c 65 64 2e | 0d ff 00 36 00 00 0c 00 | called.|...6....|
|00002ac0| 00 14 00 10 0c 00 00 16 | 00 19 0c 00 00 14 00 76 |........|.......v|
|00002ad0| 0c 00 00 16 00 7a 0c 00 | 00 14 01 34 0c 00 00 16 |.....z..|...4....|
|00002ae0| 01 3e 0c 00 00 14 01 65 | 0c 00 00 16 01 6c 0c 00 |.>.....e|.....l..|
|00002af0| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 02 41 |........|.......A|
|00002b00| 54 68 65 20 73 74 65 70 | 20 77 68 65 72 65 20 74 |The step| where t|
|00002b10| 68 65 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 20 70 |he desti|nation p|
|00002b20| 72 6f 63 65 64 75 72 65 | 20 70 75 73 68 65 73 20 |rocedure| pushes |
|00002b30| 74 68 65 20 73 74 61 74 | 69 63 20 6c 69 6e 6b 20 |the stat|ic link |
|00002b40| 6f 6e 74 6f 20 74 68 65 | 20 73 74 61 63 6b 20 69 |onto the| stack i|
|00002b50| 73 20 69 6d 70 6f 72 74 | 61 6e 74 20 61 6e 64 20 |s import|ant and |
|00002b60| 73 68 6f 75 6c 64 20 62 | 65 20 65 78 61 6d 69 6e |should b|e examin|
|00002b70| 65 64 20 6d 6f 72 65 20 | 63 6c 6f 73 65 6c 79 2e |ed more |closely.|
|00002b80| 20 20 53 70 65 63 69 66 | 69 63 61 6c 6c 79 2c 20 | Specif|ically, |
|00002b90| 68 6f 77 20 64 6f 20 79 | 6f 75 20 6b 6e 6f 77 20 |how do y|ou know |
|00002ba0| 74 68 61 74 20 61 20 73 | 74 61 74 69 63 20 6c 69 |that a s|tatic li|
|00002bb0| 6e 6b 20 70 61 72 61 6d | 65 74 65 72 20 69 73 20 |nk param|eter is |
|00002bc0| 6e 65 63 65 73 73 61 72 | 79 20 61 74 20 74 68 69 |necessar|y at thi|
|00002bd0| 73 20 70 6f 69 6e 74 3f | 20 20 41 66 74 65 72 20 |s point?| After |
|00002be0| 61 6c 6c 2c 20 53 6f 6d | 65 50 72 6f 63 65 64 75 |all, Som|eProcedu|
|00002bf0| 72 65 20 73 69 6d 70 6c | 79 20 64 65 63 6c 61 72 |re simpl|y declar|
|00002c00| 65 73 20 74 68 61 74 20 | 69 74 20 74 61 6b 65 73 |es that |it takes|
|00002c10| 20 61 20 50 52 4f 43 45 | 44 55 52 45 20 61 73 20 | a PROCE|DURE as |
|00002c20| 61 20 70 61 72 61 6d 65 | 74 65 72 3b 20 69 74 20 |a parame|ter; it |
|00002c30| 64 6f 65 73 6e d5 74 20 | 64 69 66 66 65 72 65 6e |doesn.t |differen|
|00002c40| 74 69 61 74 65 20 62 65 | 74 77 65 65 6e 20 6e 65 |tiate be|tween ne|
|00002c50| 73 74 65 64 20 61 6e 64 | 20 6e 6f 6e 2d 6e 65 73 |sted and| non-nes|
|00002c60| 74 65 64 20 70 72 6f 63 | 65 64 75 72 65 73 2e 20 |ted proc|edures. |
|00002c70| 20 42 75 74 2c 20 61 73 | 20 79 6f 75 20 73 61 77 | But, as| you saw|
|00002c80| 20 69 6e 20 74 68 65 20 | 66 69 72 73 74 20 73 65 | in the |first se|
|00002c90| 63 74 69 6f 6e 2c 20 74 | 68 65 73 65 20 74 77 6f |ction, t|hese two|
|00002ca0| 20 6b 69 6e 64 73 20 6f | 66 20 70 72 6f 63 65 64 | kinds o|f proced|
|00002cb0| 75 72 65 73 20 61 72 65 | 20 63 61 6c 6c 65 64 20 |ures are| called |
|00002cc0| 64 69 66 66 65 72 65 6e | 74 6c 79 2e 20 20 48 6f |differen|tly. Ho|
|00002cd0| 77 20 64 6f 20 79 6f 75 | 20 6b 6e 6f 77 20 69 66 |w do you| know if|
|00002ce0| 20 74 68 65 20 74 68 65 | 20 73 74 61 74 69 63 20 | the the| static |
|00002cf0| 6c 69 6e 6b 20 70 61 73 | 73 65 64 20 74 6f 20 79 |link pas|sed to y|
|00002d00| 6f 75 20 6e 65 65 64 73 | 20 74 6f 20 62 65 20 70 |ou needs| to be p|
|00002d10| 75 73 68 65 64 20 6f 6e | 74 6f 20 74 68 65 20 73 |ushed on|to the s|
|00002d20| 74 61 63 6b 20 66 6f 72 | 20 74 68 65 20 63 61 6c |tack for| the cal|
|00002d30| 6c 62 61 63 6b 20 70 72 | 6f 63 65 64 75 72 65 3f |lback pr|ocedure?|
|00002d40| 0d ff 00 1e 00 00 0c 00 | 00 14 00 e5 0c 00 00 16 |........|........|
|00002d50| 00 f2 0c 00 00 14 01 13 | 0c 00 00 16 01 1c 0c 00 |........|........|
|00002d60| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 01 f2 |........|........|
|00002d70| 54 68 65 20 61 6e 73 77 | 65 72 20 69 73 20 74 68 |The answ|er is th|
|00002d80| 61 74 20 53 6f 6d 65 50 | 72 6f 63 65 64 75 72 65 |at SomeP|rocedure|
|00002d90| 20 72 65 63 65 69 76 65 | 73 20 61 20 73 70 65 63 | receive|s a spec|
|00002da0| 69 61 6c 20 76 61 6c 75 | 65 20 66 6f 72 20 74 68 |ial valu|e for th|
|00002db0| 65 20 73 74 61 74 69 63 | 20 6c 69 6e 6b 20 70 61 |e static| link pa|
|00002dc0| 72 61 6d 65 74 65 72 20 | 66 6f 72 20 6e 6f 6e 2d |rameter |for non-|
|00002dd0| 6e 65 73 74 65 64 20 70 | 72 6f 63 65 64 75 72 65 |nested p|rocedure|
|00002de0| 73 2e 20 20 49 66 20 74 | 68 65 20 63 61 6c 6c 62 |s. If t|he callb|
|00002df0| 61 63 6b 20 70 72 6f 63 | 65 64 75 72 65 20 69 73 |ack proc|edure is|
|00002e00| 20 61 74 20 74 68 65 20 | 6f 75 74 65 72 20 6c 65 | at the |outer le|
|00002e10| 76 65 6c 2c 20 53 6f 6d | 65 50 72 6f 63 65 64 75 |vel, Som|eProcedu|
|00002e20| 72 65 20 72 65 63 65 69 | 76 65 73 20 4e 49 4c 20 |re recei|ves NIL |
|00002e30| 66 6f 72 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |for the |value of|
|00002e40| 20 74 68 65 20 73 74 61 | 74 69 63 20 6c 69 6e 6b | the sta|tic link|
|00002e50| 2e 20 20 57 68 65 6e 20 | 50 61 73 63 61 6c 20 63 |. When |Pascal c|
|00002e60| 6f 6d 70 69 6c 65 73 20 | 74 68 65 20 63 6f 6d 6d |ompiles |the comm|
|00002e70| 61 6e 64 73 20 74 68 61 | 74 20 69 6e 76 6f 6b 65 |ands tha|t invoke|
|00002e80| 20 50 52 4f 43 45 44 55 | 52 45 20 70 61 72 61 6d | PROCEDU|RE param|
|00002e90| 65 74 65 72 73 2c 20 69 | 74 20 67 65 6e 65 72 61 |eters, i|t genera|
|00002ea0| 74 65 73 20 63 6f 64 65 | 20 74 68 61 74 20 63 68 |tes code| that ch|
|00002eb0| 65 63 6b 73 20 74 68 65 | 20 73 74 61 74 69 63 20 |ecks the| static |
|00002ec0| 6c 69 6e 6b 2e 20 20 49 | 66 20 69 74 20 69 73 20 |link. I|f it is |
|00002ed0| 4e 49 4c 2c 20 69 74 20 | 64 6f 65 73 6e d5 74 20 |NIL, it |doesn.t |
|00002ee0| 70 75 73 68 20 69 74 20 | 6f 6e 74 6f 20 74 68 65 |push it |onto the|
|00002ef0| 20 73 74 61 63 6b 2e 20 | 20 49 66 20 69 74 20 69 | stack. | If it i|
|00002f00| 73 20 6e 6f 74 20 4e 49 | 4c 2c 20 74 68 65 6e 20 |s not NI|L, then |
|00002f10| 79 6f 75 20 61 72 65 20 | 63 61 6c 6c 69 6e 67 20 |you are |calling |
|00002f20| 61 20 6e 65 73 74 65 64 | 20 70 72 6f 63 65 64 75 |a nested| procedu|
|00002f30| 72 65 2c 20 61 6e 64 20 | 6d 75 73 74 20 70 75 73 |re, and |must pus|
|00002f40| 68 20 74 68 65 20 73 74 | 61 74 69 63 20 6c 69 6e |h the st|atic lin|
|00002f50| 6b 20 6f 6e 74 6f 20 74 | 68 65 20 73 74 61 63 6b |k onto t|he stack|
|00002f60| 2e 0d 00 4e 00 00 0c 00 | 00 14 00 13 0c 00 00 16 |...N....|........|
|00002f70| 00 20 0c 00 00 14 00 a5 | 0c 00 00 16 00 b2 0c 00 |. ......|........|
|00002f80| 00 14 00 bc 0c 00 00 16 | 00 bf 0c 00 00 14 01 11 |........|........|
|00002f90| 0c 00 00 16 01 1a 0c 00 | 00 14 01 60 0c 00 00 16 |........|...`....|
|00002fa0| 01 63 0c 00 00 14 01 96 | 0c 00 00 16 01 99 0c 00 |.c......|........|
|00002fb0| 00 14 00 01 0d 0f 00 06 | 00 00 0c 00 00 14 01 0c |........|........|
|00002fc0| 53 6f 2c 20 68 6f 77 20 | 64 6f 20 79 6f 75 20 75 |So, how |do you u|
|00002fd0| 74 69 6c 69 7a 65 20 6e | 65 73 74 65 64 20 70 72 |tilize n|ested pr|
|00002fe0| 6f 63 65 64 75 72 65 73 | 20 61 6e 64 20 50 52 4f |ocedures| and PRO|
|00002ff0| 43 45 44 55 52 45 20 70 | 61 72 61 6d 65 74 65 72 |CEDURE p|arameter|
|00003000| 73 20 69 6e 20 43 20 6f | 72 20 43 2b 2b 3f 20 20 |s in C o|r C++? |
|00003010| 4f 62 76 69 6f 75 73 6c | 79 2c 20 79 6f 75 20 63 |Obviousl|y, you c|
|00003020| 61 6e 6e 6f 74 d1 61 74 | 20 6c 65 61 73 74 20 6e |annot.at| least n|
|00003030| 6f 74 20 64 69 72 65 63 | 74 6c 79 2e 20 20 43 20 |ot direc|tly. C |
|00003040| 61 6e 64 20 43 2b 2b 20 | 64 6f 6e d5 74 20 73 75 |and C++ |don.t su|
|00003050| 70 70 6f 72 74 20 74 68 | 65 6d 2e 20 20 41 74 20 |pport th|em. At |
|00003060| 74 68 69 73 20 70 6f 69 | 6e 74 2c 20 79 6f 75 20 |this poi|nt, you |
|00003070| 6d 69 67 68 74 20 61 73 | 20 77 65 6c 6c 20 6a 75 |might as| well ju|
|00003080| 73 74 20 67 69 76 65 20 | 75 70 20 61 6e 64 20 75 |st give |up and u|
|00003090| 73 65 20 50 61 73 63 61 | 6c 3b 20 79 6f 75 20 61 |se Pasca|l; you a|
|000030a0| 6c 77 61 79 73 20 73 61 | 69 64 20 43 2b 2b 20 77 |lways sa|id C++ w|
|000030b0| 61 73 20 68 69 67 68 6c | 79 20 6f 76 65 72 72 61 |as highl|y overra|
|000030c0| 74 65 64 20 61 6e 79 77 | 61 79 2e 0d 00 12 00 00 |ted anyw|ay......|
|000030d0| 0c 00 00 14 00 2d 0c 00 | 00 16 00 36 0c 00 00 14 |.....-..|...6....|
|000030e0| 00 01 0d 01 00 06 00 00 | 0c 00 00 14 00 24 54 68 |........|.....$Th|
|000030f0| 65 72 65 20 61 72 65 20 | 74 77 6f 20 73 63 65 6e |ere are |two scen|
|00003100| 61 72 69 6f 73 20 74 6f | 20 65 78 61 6d 69 6e 65 |arios to| examine|
|00003110| 3a 0d 00 06 00 00 0c 00 | 00 14 00 09 01 dd 03 00 |:.......|........|
|00003120| 00 00 00 09 02 07 02 07 | 02 10 02 10 02 10 02 10 |........|........|
|00003130| 02 10 02 10 02 10 02 10 | 02 10 02 10 00 01 0d 01 |........|........|
|00003140| 00 06 00 00 0c 00 00 14 | 00 75 a5 09 41 20 50 61 |........|.u..A Pa|
|00003150| 73 63 61 6c 20 72 6f 75 | 74 69 6e 65 20 63 61 6c |scal rou|tine cal|
|00003160| 6c 73 20 79 6f 75 72 20 | 43 2b 2b 20 72 6f 75 74 |ls your |C++ rout|
|00003170| 69 6e 65 2c 20 70 61 73 | 73 69 6e 67 20 61 20 50 |ine, pas|sing a P|
|00003180| 52 4f 43 45 44 55 52 45 | 20 70 61 72 61 6d 65 74 |ROCEDURE| paramet|
|00003190| 65 72 20 74 6f 20 61 6e | 6f 74 68 65 72 20 50 61 |er to an|other Pa|
|000031a0| 73 63 61 6c 20 72 6f 75 | 74 69 6e 65 20 79 6f 75 |scal rou|tine you|
|000031b0| 20 68 61 76 65 20 74 6f | 20 63 61 6c 6c 2e 0d 07 | have to| call...|
|000031c0| 00 12 00 00 0c 00 00 14 | 00 35 0c 00 00 16 00 3e |........|.5.....>|
|000031d0| 0c 00 00 14 00 6e fa 5f | 09 f5 95 f7 54 0f 43 f2 |.....n._|....T.C.|
|000031e0| bf 2b 04 5f 75 27 31 0c | 6a a8 06 0f 50 68 c6 a0 |.+._u'1.|j...Ph..|
|000031f0| 45 f7 52 73 10 1f 78 e1 | c2 73 f6 70 60 f5 0f 52 |E.Rs..x.|.s.p`..R|
|00003200| f4 ff 43 f4 5f 44 f5 5f | 52 f4 50 e6 46 f6 d1 21 |..C._D._|R.P.F..!|
|00003210| 4f 2c 0f 77 b7 cb 0f 79 | 5f 75 0b 6f 76 10 7f 6d |O,.w...y|_u.ov..m|
|00003220| ea 1f 6d 13 21 90 73 0f | 43 f2 bf 2b f2 ef 0d 00 |..m.!.s.|C..+....|
|00003230| 00 12 00 00 0c 00 00 14 | 00 36 0c 00 00 16 00 3f |........|.6.....?|
|00003240| 0c 00 00 14 00 09 01 dd | 00 00 00 00 00 09 02 07 |........|........|
|00003250| 02 07 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003260| 02 10 02 10 02 10 00 01 | 0d 00 00 06 00 00 0c 00 |........|........|
|00003270| 00 14 00 01 0d 02 00 06 | 00 00 0c 00 00 14 00 06 |........|........|
|00003280| 00 00 0c 00 00 14 00 33 | 54 68 65 20 72 65 73 74 |.......3|The rest|
|00003290| 20 6f 66 20 74 68 65 20 | 4e 6f 74 65 20 6c 6f 6f | of the |Note loo|
|000032a0| 6b 73 20 61 74 20 62 6f | 74 68 20 6f 66 20 74 68 |ks at bo|th of th|
|000032b0| 65 73 65 20 63 61 73 65 | 73 2e 0d 00 00 06 00 00 |ese case|s.......|
|000032c0| 0c 00 00 14 00 01 0d 01 | 00 06 00 00 0c 00 00 14 |........|........|
|000032d0| 00 09 01 dd 03 00 00 00 | 00 09 02 07 02 07 02 10 |........|........|
|000032e0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000032f0| 02 10 00 09 01 dd 00 00 | 00 00 00 09 02 07 02 07 |........|........|
|00003300| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003310| 02 10 02 10 00 00 ff d6 | 00 4d 03 be 00 0d 4d 41 |........|.M....MA|
|00003320| 47 49 43 50 49 43 11 01 | ff 20 00 01 0d 01 00 06 |GICPIC..|. ......|
|00003330| 00 00 0c 00 00 14 00 01 | 0d 00 00 06 00 00 09 00 |........|........|
|00003340| 00 16 00 01 0d 00 00 06 | 00 00 0c 00 00 14 01 27 |........|.......'|
|00003350| 4d 61 63 41 70 70 20 73 | 75 70 70 6f 72 74 73 20 |MacApp s|upports |
|00003360| 61 6e 20 6f 62 6a 65 63 | 74 20 69 6e 73 70 65 63 |an objec|t inspec|
|00003370| 74 6f 72 2c 20 77 68 69 | 63 68 20 69 74 20 69 6d |tor, whi|ch it im|
|00003380| 70 6c 65 6d 65 6e 74 73 | 20 62 79 20 63 61 6c 6c |plements| by call|
|00003390| 69 6e 67 20 61 20 46 69 | 65 6c 64 73 20 6d 65 74 |ing a Fi|elds met|
|000033a0| 68 6f 64 20 63 6f 6d 6d | 6f 6e 20 74 6f 20 61 6c |hod comm|on to al|
|000033b0| 6c 20 64 65 73 63 65 6e | 64 61 6e 74 73 20 6f 66 |l descen|dants of|
|000033c0| 20 54 4f 62 6a 65 63 74 | 2e 20 20 45 61 63 68 20 | TObject|. Each |
|000033d0| 63 6c 61 73 73 20 79 6f | 75 20 64 65 66 69 6e 65 |class yo|u define|
|000033e0| 20 73 68 6f 75 6c 64 20 | 6f 76 65 72 72 69 64 65 | should |override|
|000033f0| 20 74 68 69 73 20 6d 65 | 74 68 6f 64 20 73 6f 20 | this me|thod so |
|00003400| 74 68 61 74 20 4d 61 63 | 41 70 70 20 63 61 6e 20 |that Mac|App can |
|00003410| 66 69 6e 64 20 6f 75 74 | 20 61 62 6f 75 74 20 74 |find out| about t|
|00003420| 68 65 20 66 69 65 6c 64 | 73 20 79 6f 75 72 20 63 |he field|s your c|
|00003430| 6c 61 73 73 20 64 65 66 | 69 6e 65 73 2e 20 20 53 |lass def|ines. S|
|00003440| 75 63 68 20 61 20 6d 65 | 74 68 6f 64 20 64 65 66 |uch a me|thod def|
|00003450| 69 6e 69 74 69 6f 6e 20 | 77 6f 75 6c 64 20 6c 6f |inition |would lo|
|00003460| 6f 6b 20 6c 69 6b 65 20 | 74 68 65 20 66 6f 6c 6c |ok like |the foll|
|00003470| 6f 77 69 6e 67 3a 0d 00 | 00 1e 00 00 0c 00 00 14 |owing:..|........|
|00003480| 00 46 0c 00 00 16 00 4c | 0c 00 00 14 00 71 0c 00 |.F.....L|.....q..|
|00003490| 00 16 00 78 0c 00 00 14 | 00 09 01 dd 00 00 00 00 |...x....|........|
|000034a0| 00 09 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000034b0| 02 10 02 10 02 10 02 10 | 02 10 00 09 01 dd 03 00 |........|........|
|000034c0| 00 00 00 09 02 07 02 07 | 02 10 02 10 02 10 02 10 |........|........|
|000034d0| 02 10 02 10 02 10 02 10 | 02 10 02 10 00 09 01 dd |........|........|
|000034e0| 03 00 00 00 00 09 02 07 | 02 07 02 10 02 10 02 10 |........|........|
|000034f0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 00 2d |........|.......-|
|00003500| 01 b9 03 00 00 00 00 1b | 02 07 02 07 02 10 02 10 |........|........|
|00003510| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003520| 00 00 09 00 00 16 00 52 | 20 20 20 20 20 20 20 20 |.......R| |
|00003530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003550| 20 20 20 20 20 20 20 20 | 20 20 66 69 65 6c 64 54 | | fieldT|
|00003560| 79 70 65 3a 20 49 4e 54 | 45 47 45 52 29 29 3b 20 |ype: INT|EGER)); |
|00003570| 4f 56 45 52 52 49 44 45 | 3b 0d 00 06 00 00 09 00 |OVERRIDE|;.......|
|00003580| 00 16 00 01 0d 00 00 06 | 00 00 09 00 00 16 00 06 |........|........|
|00003590| 42 45 47 49 4e 0d 00 06 | 00 00 09 00 00 16 00 2a |BEGIN...|.......*|
|000035a0| 20 20 44 6f 54 6f 46 69 | 65 6c 64 28 27 54 4a 75 | DoToFi|eld('TJu|
|000035b0| 73 74 43 6f 6d 6d 61 6e | 64 27 2c 20 4e 49 4c 2c |stComman|d', NIL,|
|000035c0| 20 62 43 6c 61 73 73 29 | 3b 0d 00 06 00 00 09 00 | bClass)|;.......|
|000035d0| 00 16 00 2b 20 20 44 6f | 54 6f 46 69 65 6c 64 28 |...+ Do|ToField(|
|000035e0| 27 66 54 45 56 69 65 77 | 27 2c 20 40 66 54 45 56 |'fTEView|', @fTEV|
|000035f0| 69 65 77 2c 20 62 4f 62 | 6a 65 63 74 29 3b 0d 3f |iew, bOb|ject);.?|
|00003600| 00 06 00 00 09 00 00 16 | 00 2e 20 20 44 6f 54 6f |........|.. DoTo|
|00003610| 46 69 65 6c 64 28 27 66 | 4f 6c 64 4a 75 73 74 27 |Field('f|OldJust'|
|00003620| 2c 20 40 66 4f 6c 64 4a | 75 73 74 2c 20 62 49 6e |, @fOldJ|ust, bIn|
|00003630| 74 65 67 65 72 29 3b 0d | 00 06 00 00 09 00 00 16 |teger);.|........|
|00003640| 00 2e 20 20 44 6f 54 6f | 46 69 65 6c 64 28 27 66 |.. DoTo|Field('f|
|00003650| 4e 65 77 4a 75 73 74 27 | 2c 20 40 66 4e 65 77 4a |NewJust'|, @fNewJ|
|00003660| 75 73 74 2c 20 62 49 6e | 74 65 67 65 72 29 3b 0d |ust, bIn|teger);.|
|00003670| 00 06 00 00 09 00 00 16 | 00 1f 20 20 49 4e 48 45 |........|.. INHE|
|00003680| 52 49 54 45 44 20 46 69 | 65 6c 64 73 28 44 6f 54 |RITED Fi|elds(DoT|
|00003690| 6f 46 69 65 6c 64 29 3b | 0d ff 00 06 00 00 09 00 |oField);|........|
|000036a0| 00 16 00 09 01 dd 00 00 | 00 00 00 09 02 07 02 07 |........|........|
|000036b0| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|000036c0| 02 10 02 10 00 02 7d 0d | 00 06 00 00 09 00 00 16 |......}.|........|
|000036d0| 00 01 0d 00 00 06 00 00 | 0c 00 00 14 0c 00 00 14 |........|........|
|000036e0| 01 71 59 6f 75 20 74 65 | 6c 6c 20 69 74 20 74 68 |.qYou te|ll it th|
|000036f0| 65 20 6e 61 6d 65 20 6f | 66 20 79 6f 75 72 20 63 |e name o|f your c|
|00003700| 6c 61 73 73 20 73 6f 20 | 74 68 61 74 20 77 68 61 |lass so |that wha|
|00003710| 74 65 76 65 72 20 72 6f | 75 74 69 6e 65 20 69 73 |tever ro|utine is|
|00003720| 20 63 61 6c 6c 69 6e 67 | 20 79 6f 75 20 28 75 73 | calling| you (us|
|00003730| 75 61 6c 6c 79 20 4d 61 | 63 41 70 70 d5 73 20 69 |ually Ma|cApp.s i|
|00003740| 6e 73 70 65 63 74 6f 72 | 20 6f 72 20 64 65 62 75 |nspector| or debu|
|00003750| 67 67 65 72 29 20 63 61 | 6e 20 69 64 65 6e 74 69 |gger) ca|n identi|
|00003760| 66 79 20 74 68 65 20 63 | 6c 61 73 73 20 69 74 20 |fy the c|lass it |
|00003770| 69 73 20 69 6e 73 70 65 | 63 74 69 6e 67 2e 20 20 |is inspe|cting. |
|00003780| 54 68 65 6e 2c 20 66 6f | 72 20 65 61 63 68 20 66 |Then, fo|r each f|
|00003790| 69 65 6c 64 20 69 6e 20 | 79 6f 75 72 20 63 6c 61 |ield in |your cla|
|000037a0| 73 73 2c 20 79 6f 75 20 | 63 61 6c 6c 20 74 68 65 |ss, you |call the|
|000037b0| 20 70 72 6f 63 65 64 75 | 72 65 20 70 61 73 73 65 | procedu|re passe|
|000037c0| 64 20 74 6f 20 79 6f 75 | 2c 20 67 69 76 69 6e 67 |d to you|, giving|
|000037d0| 20 69 74 20 74 68 65 20 | 74 68 72 65 65 20 70 61 | it the |three pa|
|000037e0| 72 61 6d 65 74 65 72 73 | 20 69 74 20 6e 65 65 64 |rameters| it need|
|000037f0| 73 2e 20 20 46 69 6e 61 | 6c 6c 79 2c 20 79 6f 75 |s. Fina|lly, you|
|00003800| 20 63 61 6c 6c 20 79 6f | 75 72 20 73 75 70 65 72 | call yo|ur super|
|00003810| 63 6c 61 73 73 d5 73 20 | 46 69 65 6c 64 73 20 6d |class.s |Fields m|
|00003820| 65 74 68 6f 64 20 73 6f | 20 74 68 61 74 20 69 74 |ethod so| that it|
|00003830| 20 63 61 6e 20 69 64 65 | 6e 74 69 66 79 20 69 74 | can ide|ntify it|
|00003840| 73 20 6e 61 6d 65 20 61 | 6e 64 20 66 69 65 6c 64 |s name a|nd field|
|00003850| 73 2e 0d ff 00 12 00 00 | 0c 00 00 14 01 36 0c 00 |s.......|.....6..|
|00003860| 00 16 01 3c 0c 00 00 14 | 00 01 0d 06 00 06 00 00 |...<....|........|
|00003870| 0c 00 00 14 02 8c 57 68 | 65 6e 20 79 6f 75 72 20 |......Wh|en your |
|00003880| 46 69 65 6c 64 73 20 6d | 65 74 68 6f 64 20 69 73 |Fields m|ethod is|
|00003890| 20 63 61 6c 6c 65 64 2c | 20 74 68 65 20 44 6f 54 | called,| the DoT|
|000038a0| 6f 46 69 65 6c 64 20 70 | 61 72 61 6d 65 74 65 72 |oField p|arameter|
|000038b0| 20 61 70 70 65 61 72 73 | 20 6f 6e 20 74 68 65 20 | appears| on the |
|000038c0| 73 74 61 63 6b 20 61 73 | 20 61 20 70 6f 69 6e 74 |stack as| a point|
|000038d0| 65 72 20 74 6f 20 74 68 | 65 20 70 72 6f 63 65 64 |er to th|e proced|
|000038e0| 75 72 65 20 79 6f 75 20 | 61 72 65 20 73 75 70 70 |ure you |are supp|
|000038f0| 6f 73 65 64 20 74 6f 20 | 63 61 6c 6c 2c 20 61 73 |osed to |call, as|
|00003900| 20 77 65 6c 6c 20 61 73 | 20 74 68 65 20 73 74 61 | well as| the sta|
|00003910| 74 69 63 20 6c 69 6e 6b | 20 76 61 6c 75 65 20 69 |tic link| value i|
|00003920| 74 20 6e 65 65 64 73 2e | 20 20 57 68 65 6e 20 79 |t needs.| When y|
|00003930| 6f 75 20 61 63 74 75 61 | 6c 6c 79 20 63 61 6c 6c |ou actua|lly call|
|00003940| 20 44 6f 54 6f 46 69 65 | 6c 64 2c 20 74 68 65 20 | DoToFie|ld, the |
|00003950| 6e 65 63 65 73 73 61 72 | 79 20 70 61 72 61 6d 65 |necessar|y parame|
|00003960| 74 65 72 73 20 61 72 65 | 20 66 69 72 73 74 20 70 |ters are| first p|
|00003970| 75 73 68 65 64 20 6f 6e | 74 6f 20 74 68 65 20 73 |ushed on|to the s|
|00003980| 74 61 63 6b 20 28 69 2e | 65 2e 2c 20 66 69 65 6c |tack (i.|e., fiel|
|00003990| 64 4e 61 6d 65 2c 20 66 | 69 65 6c 64 41 64 64 72 |dName, f|ieldAddr|
|000039a0| 2c 20 61 6e 64 20 66 69 | 65 6c 64 54 79 70 65 29 |, and fi|eldType)|
|000039b0| 2e 20 20 50 61 73 63 61 | 6c 20 74 68 65 6e 20 61 |. Pasca|l then a|
|000039c0| 64 64 73 20 73 6f 6d 65 | 20 63 6f 64 65 20 74 68 |dds some| code th|
|000039d0| 61 74 20 6d 61 6b 65 73 | 20 61 20 64 65 74 65 72 |at makes| a deter|
|000039e0| 6d 69 6e 61 74 69 6f 6e | 20 62 61 73 65 64 20 6f |mination| based o|
|000039f0| 6e 20 74 68 65 20 76 61 | 6c 75 65 20 6f 66 20 74 |n the va|lue of t|
|00003a00| 68 65 20 73 74 61 74 69 | 63 20 6c 69 6e 6b 20 70 |he stati|c link p|
|00003a10| 61 72 61 6d 65 74 65 72 | 2e 20 20 49 66 20 69 74 |arameter|. If it|
|00003a20| 20 69 73 20 6e 6f 6e 2d | 7a 65 72 6f 2c 20 74 68 | is non-|zero, th|
|00003a30| 65 6e 20 79 6f 75 20 61 | 72 65 20 63 61 6c 6c 69 |en you a|re calli|
|00003a40| 6e 67 20 61 20 6e 65 73 | 74 65 64 20 70 72 6f 63 |ng a nes|ted proc|
|00003a50| 65 64 75 72 65 20 61 6e | 64 20 6e 65 65 64 20 74 |edure an|d need t|
|00003a60| 6f 20 70 61 73 73 20 62 | 61 63 6b 20 74 68 65 20 |o pass b|ack the |
|00003a70| 73 74 61 74 69 63 20 6c | 69 6e 6b 20 62 61 63 6b |static l|ink back|
|00003a80| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 2e 20 20 | on the |stack. |
|00003a90| 49 66 20 73 74 61 74 69 | 63 20 6c 69 6e 6b 20 69 |If stati|c link i|
|00003aa0| 73 20 7a 65 72 6f 2c 20 | 74 68 65 6e 20 79 6f 75 |s zero, |then you|
|00003ab0| 20 61 72 65 20 6e 6f 74 | 20 63 61 6c 6c 69 6e 67 | are not| calling|
|00003ac0| 20 61 20 6e 65 73 74 65 | 64 20 70 72 6f 63 65 64 | a neste|d proced|
|00003ad0| 75 72 65 20 61 6e 64 20 | 64 6f 6e d5 74 20 6e 65 |ure and |don.t ne|
|00003ae0| 65 64 20 74 6f 20 70 61 | 73 73 20 74 68 61 74 20 |ed to pa|ss that |
|00003af0| 73 74 61 74 69 63 20 6c | 69 6e 6b 20 62 61 63 6b |static l|ink back|
|00003b00| 2e 0d 00 4e 00 00 0c 00 | 00 14 00 0a 0c 00 00 16 |...N....|........|
|00003b10| 00 10 0c 00 00 14 00 27 | 0c 00 00 16 00 30 0c 00 |.......'|.....0..|
|00003b20| 00 14 00 cb 0c 00 00 16 | 00 d4 0c 00 00 14 01 16 |........|........|
|00003b30| 0c 00 00 16 01 1f 0c 00 | 00 14 01 21 0c 00 00 16 |........|...!....|
|00003b40| 01 2a 0c 00 00 14 01 30 | 0c 00 00 16 01 39 0c 00 |.*.....0|.....9..|
|00003b50| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 00 c5 |........|........|
|00003b60| 50 61 73 63 61 6c 20 68 | 61 6e 64 6c 65 73 20 61 |Pascal h|andles a|
|00003b70| 6c 6c 20 6f 66 20 74 68 | 69 73 20 66 6f 72 20 79 |ll of th|is for y|
|00003b80| 6f 75 20 74 72 61 6e 73 | 70 61 72 65 6e 74 6c 79 |ou trans|parently|
|00003b90| 2e 20 20 54 68 69 73 20 | 65 61 73 65 20 69 6e 20 |. This |ease in |
|00003ba0| 50 61 73 63 61 6c 20 6d | 61 6b 65 73 20 74 68 65 |Pascal m|akes the|
|00003bb0| 20 70 72 6f 63 65 73 73 | 20 6f 66 20 77 72 69 74 | process| of writ|
|00003bc0| 69 6e 67 20 61 20 73 69 | 6d 69 6c 61 72 20 72 6f |ing a si|milar ro|
|00003bd0| 75 74 69 6e 65 20 69 6e | 20 43 20 6f 72 20 43 2b |utine in| C or C+|
|00003be0| 2b 20 74 68 61 74 20 6d | 75 63 68 20 6d 6f 72 65 |+ that m|uch more|
|00003bf0| 20 64 69 66 66 69 63 75 | 6c 74 2c 20 61 73 20 74 | difficu|lt, as t|
|00003c00| 68 61 74 20 70 72 6f 63 | 65 73 73 20 68 61 73 20 |hat proc|ess has |
|00003c10| 62 65 65 6e 20 68 69 64 | 64 65 6e 20 66 72 6f 6d |been hid|den from|
|00003c20| 20 75 73 2e 0d 2e 00 06 | 00 00 0c 00 00 14 00 01 | us.....|........|
|00003c30| 0d 20 00 06 00 00 0c 00 | 00 14 00 93 54 68 65 72 |. ......|....Ther|
|00003c40| 65 20 69 73 20 6e 6f 20 | 77 61 79 20 69 6e 20 43 |e is no |way in C|
|00003c50| 20 6f 72 20 43 2b 2b 20 | 74 6f 20 70 61 73 73 20 | or C++ |to pass |
|00003c60| 61 20 76 61 72 69 61 62 | 6c 65 20 6e 75 6d 62 65 |a variab|le numbe|
|00003c70| 72 20 6f 66 20 70 61 72 | 61 6d 65 74 65 72 73 20 |r of par|ameters |
|00003c80| 69 6e 20 6f 6e 65 20 73 | 74 61 74 65 6d 65 6e 74 |in one s|tatement|
|00003c90| 2e 20 20 49 6e 20 6f 74 | 68 65 72 20 77 6f 72 64 |. In ot|her word|
|00003ca0| 73 2c 20 79 6f 75 20 63 | 61 6e 6e 6f 74 20 64 6f |s, you c|annot do|
|00003cb0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 6c 69 6b 65 20 | somethi|ng like |
|00003cc0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 3a 0d 05 |the foll|owing:..|
|00003cd0| 00 12 00 00 0c 00 00 14 | 00 6b 0c 01 00 14 00 71 |........|.k.....q|
|00003ce0| 0c 00 00 14 00 09 01 dd | 03 00 00 00 00 09 02 07 |........|........|
|00003cf0| 02 07 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003d00| 02 10 02 10 02 10 00 09 | 01 dd 00 00 00 00 00 09 |........|........|
|00003d10| 02 07 02 07 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003d20| 02 10 02 10 02 10 02 10 | 00 09 01 dd 03 00 00 00 |........|........|
|00003d30| 00 09 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00003d40| 02 10 02 10 02 10 02 10 | 02 10 00 25 e6 8c 6a 0f |........|...%..j.|
|00003d50| 76 57 90 f4 45 f4 74 6f | 7a 1f 28 f5 4f 4f f6 2f |vW..E.to|z.(.OO./|
|00003d60| 6a 1c 2f 2a 07 21 f6 df | 29 0f 7b f0 d0 00 00 06 |j./*.!..|).{.....|
|00003d70| 00 00 09 00 00 16 00 00 | 01 e6 03 01 00 00 00 00 |........|........|
|00003d80| 01 d4 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d90| 00 00 00 00 00 00 00 00 | 00 01 0d 25 00 06 00 00 |........|...%....|
|00003da0| 09 00 00 16 00 14 01 85 | 54 68 61 74 20 77 6f 75 |........|That wou|
|00003db0| 6c 64 20 62 65 20 74 6f | 6f 20 65 61 73 79 2e 20 |ld be to|o easy. |
|00003dc0| 20 49 6e 73 74 65 61 64 | 2c 20 79 6f 75 20 6d 75 | Instead|, you mu|
|00003dd0| 73 74 20 75 73 65 20 73 | 6f 6d 65 20 69 6e 6c 69 |st use s|ome inli|
|00003de0| 6e 65 20 67 6c 75 65 20 | 74 68 61 74 20 70 72 65 |ne glue |that pre|
|00003df0| 70 61 72 65 73 20 74 68 | 65 20 73 74 61 63 6b 20 |pares th|e stack |
|00003e00| 66 6f 72 20 79 6f 75 2e | 20 20 54 68 69 73 20 69 |for you.| This i|
|00003e10| 6e 6c 69 6e 65 20 70 72 | 6f 63 65 64 75 72 65 20 |nline pr|ocedure |
|00003e20| 61 63 63 65 70 74 73 20 | 74 68 65 20 74 68 72 65 |accepts |the thre|
|00003e30| 65 20 70 61 72 61 6d 65 | 74 65 72 73 20 79 6f 75 |e parame|ters you|
|00003e40| 20 73 65 65 20 69 6e 20 | 74 68 65 20 50 61 73 63 | see in |the Pasc|
|00003e50| 61 6c 20 76 65 72 73 69 | 6f 6e 2c 20 61 73 20 77 |al versi|on, as w|
|00003e60| 65 6c 6c 20 61 73 20 62 | 6f 74 68 20 63 6f 6d 70 |ell as b|oth comp|
|00003e70| 6f 6e 65 6e 74 73 20 6f | 66 20 74 68 65 20 50 52 |onents o|f the PR|
|00003e80| 4f 43 45 44 55 52 45 20 | 70 61 72 61 6d 65 74 65 |OCEDURE |paramete|
|00003e90| 72 20 28 69 2e 65 2e 2c | 20 74 68 65 20 70 72 6f |r (i.e.,| the pro|
|00003ea0| 63 65 64 75 72 65 20 70 | 6f 69 6e 74 65 72 20 61 |cedure p|ointer a|
|00003eb0| 6e 64 20 73 74 61 74 69 | 63 20 6c 69 6e 6b 29 2e |nd stati|c link).|
|00003ec0| 20 20 54 68 65 20 67 6c | 75 65 20 6c 6f 6f 6b 73 | The gl|ue looks|
|00003ed0| 20 61 74 20 74 68 65 20 | 73 74 61 74 69 63 20 6c | at the |static l|
|00003ee0| 69 6e 6b 20 76 61 6c 75 | 65 20 61 6e 64 20 72 65 |ink valu|e and re|
|00003ef0| 6d 6f 76 65 73 20 69 74 | 20 66 72 6f 6d 20 74 68 |moves it| from th|
|00003f00| 65 20 73 74 61 63 6b 20 | 69 66 20 69 74 20 69 73 |e stack |if it is|
|00003f10| 20 7a 65 72 6f 20 61 6e | 64 2c 20 74 68 75 73 2c | zero an|d, thus,|
|00003f20| 20 6e 6f 74 20 6e 65 65 | 64 65 64 2e 0d 00 00 12 | not nee|ded.....|
|00003f30| 00 00 0c 00 00 14 00 d6 | 0c 00 00 16 00 df 0c 00 |........|........|
|00003f40| 00 14 00 01 0d 00 00 06 | 00 00 0c 00 00 14 00 1c |........|........|
|00003f50| 4f 6e 65 20 73 6f 6c 75 | 74 69 6f 6e 20 69 73 20 |One solu|tion is |
|00003f60| 61 73 20 66 6f 6c 6c 6f | 77 73 3a 0d 00 06 00 00 |as follo|ws:.....|
|00003f70| 0c 00 00 14 00 32 f5 06 | 88 06 0f 50 57 32 14 02 |.....2..|...PW2..|
|00003f80| 50 60 82 4f 75 c2 07 30 | f4 45 f5 45 f4 92 1f 6d |P`.Ou..0|.E.E...m|
|00003f90| f5 ff 53 26 27 cf 4c 73 | f6 bf 0d 00 00 06 00 00 |..S&'.Ls|........|
|00003fa0| 0c 01 00 14 00 f5 06 8c | 6a 0f 52 1d 14 13 c1 f2 |........|j.R.....|
|00003fb0| 00 19 00 00 73 20 f6 74 | 6f 7a 14 f4 35 f7 53 20 |....s .t|oz..5.S |
|00003fc0| f3 d0 f3 0f 3b f0 d0 00 | 00 06 00 00 09 00 00 16 |....;...|........|
|00003fd0| 00 14 00 02 0c 02 00 14 | 00 1a 0c 00 00 14 50 74 |........|......Pt|
|00003fe0| 00 01 0d 43 00 06 00 00 | 09 00 00 16 0d 00 00 06 |...C....|........|
|00003ff0| 00 00 09 00 00 16 00 53 | 20 20 20 20 20 20 20 20 |.......S| |
|00004000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 68 6f | | sho|
|00004020| 72 74 20 66 69 65 6c 64 | 54 79 70 65 2c 20 76 6f |rt field|Type, vo|
|00004030| 69 64 20 2a 44 6f 54 6f | 46 69 65 6c 64 5f 53 74 |id *DoTo|Field_St|
|00004040| 61 74 69 63 4c 69 6e 6b | 29 3b 0d 00 00 06 00 00 |aticLink|);......|
|00004050| 09 00 00 16 00 01 0d 00 | 00 06 00 00 09 00 00 16 |........|........|
|00004060| 00 47 70 61 73 63 61 6c | 20 76 6f 69 64 20 43 61 |.Gpascal| void Ca|
|00004070| 6c 6c 44 6f 54 6f 46 69 | 65 6c 64 28 53 74 72 69 |llDoToFi|eld(Stri|
|00004080| 6e 67 50 74 72 2c 20 50 | 74 72 2c 20 73 68 6f 72 |ngPtr, P|tr, shor|
|00004090| 74 2c 20 76 6f 69 64 20 | 2a 2c 20 46 69 65 6c 64 |t, void |*, Field|
|000040a0| 50 72 6f 63 50 74 72 29 | 0d 00 00 06 00 00 09 00 |ProcPtr)|........|
|000040b0| 00 16 00 06 20 20 3d 20 | 7b 0d 00 06 00 00 09 00 |.... = |{.......|
|000040c0| 00 16 00 45 20 20 20 20 | 30 78 32 30 35 46 2c 20 |...E |0x205F, |
|000040d0| 20 20 20 2f 2f 20 4d 4f | 56 45 41 2e 4c 20 20 20 | // MO|VEA.L |
|000040e0| 20 28 41 37 29 2b 2c 41 | 30 20 20 20 20 3b 20 67 | (A7)+,A|0 ; g|
|000040f0| 65 74 20 74 68 65 20 44 | 6f 54 6f 46 69 65 6c 64 |et the D|oToField|
|00004100| 20 70 6f 69 6e 74 65 72 | 0d 00 00 06 00 00 09 00 | pointer|........|
|00004110| 00 16 00 40 20 20 20 20 | 30 78 34 41 39 37 2c 20 |...@ |0x4A97, |
|00004120| 20 20 20 2f 2f 20 54 53 | 54 2e 4c 20 20 20 20 20 | // TS|T.L |
|00004130| 20 28 41 37 29 20 20 20 | 20 20 20 20 20 3b 20 63 | (A7) | ; c|
|00004140| 68 65 63 6b 20 74 68 65 | 20 53 74 61 74 69 63 4c |heck the| StaticL|
|00004150| 69 6e 6b 0d 00 06 00 00 | 09 00 00 16 00 43 20 20 |ink.....|.....C |
|00004160| 20 20 30 78 36 36 30 32 | 2c 20 20 20 20 2f 2f 20 | 0x6602|, // |
|00004170| 42 4e 45 2e 53 20 20 20 | 20 20 20 2a 2b 24 30 30 |BNE.S | *+$00|
|00004180| 30 34 20 20 20 20 20 3b | 20 69 66 20 6e 6f 6e 2d |04 ;| if non-|
|00004190| 7a 65 72 6f 2c 20 6b 65 | 65 70 20 69 74 20 69 6e |zero, ke|ep it in|
|000041a0| 0d 00 00 06 00 00 09 00 | 00 16 00 40 20 20 20 20 |........|...@ |
|000041b0| 30 78 35 38 38 46 2c 20 | 20 20 20 2f 2f 20 41 44 |0x588F, | // AD|
|000041c0| 44 51 2e 4c 20 20 20 20 | 20 23 24 34 2c 41 37 20 |DQ.L | #$4,A7 |
|000041d0| 20 20 20 20 20 3b 20 69 | 66 20 7a 65 72 6f 2c 20 | ; i|f zero, |
|000041e0| 70 75 6c 6c 20 69 74 20 | 6f 66 66 0d 00 06 00 00 |pull it |off.....|
|000041f0| 09 00 00 16 00 3a 20 20 | 20 20 30 78 34 45 39 30 |.....: | 0x4E90|
|00004200| 20 20 20 20 20 2f 2f 20 | 4a 53 52 20 20 20 20 20 | // |JSR |
|00004210| 20 20 20 28 41 30 29 20 | 20 20 20 20 20 20 20 3b | (A0) | ;|
|00004220| 20 43 61 6c 6c 20 44 6f | 54 6f 46 69 65 6c 64 0d | Call Do|ToField.|
|00004230| 00 06 00 00 09 00 00 16 | 00 08 20 20 20 20 7d 3b |........|.. };|
|00004240| 20 0d 00 06 00 00 09 00 | 00 16 00 01 0d 00 00 06 | .......|........|
|00004250| 00 00 09 00 00 16 00 55 | 70 61 73 63 61 6c 20 76 |.......U|pascal v|
|00004260| 6f 69 64 20 54 4a 75 73 | 74 43 6f 6d 6d 61 6e 64 |oid TJus|tCommand|
|00004270| 3a 3a 46 69 65 6c 64 73 | 28 46 69 65 6c 64 50 72 |::Fields|(FieldPr|
|00004280| 6f 63 50 74 72 20 44 6f | 54 6f 46 69 65 6c 64 2c |ocPtr Do|ToField,|
|00004290| 20 76 6f 69 64 20 2a 44 | 6f 54 6f 46 69 65 6c 64 | void *D|oToField|
|000042a0| 5f 53 74 61 74 69 63 4c | 69 6e 6b 29 0d ff 00 06 |_StaticL|ink)....|
|000042b0| 00 00 09 00 00 16 00 02 | 7b 0d 00 06 00 00 09 00 |........|{.......|
|000042c0| 00 16 00 52 20 20 43 61 | 6c 6c 44 6f 54 6f 46 69 |...R Ca|llDoToFi|
|000042d0| 65 6c 64 28 22 5c 70 54 | 4a 75 73 74 43 6f 6d 6d |eld("\pT|JustComm|
|000042e0| 61 6e 64 22 2c 20 4e 55 | 4c 4c 2c 20 62 43 6c 61 |and", NU|LL, bCla|
|000042f0| 73 73 2c 20 44 6f 54 6f | 46 69 65 6c 64 5f 53 74 |ss, DoTo|Field_St|
|00004300| 61 74 69 63 4c 69 6e 6b | 2c 20 44 6f 54 6f 46 69 |aticLink|, DoToFi|
|00004310| 65 6c 64 29 3b 0d 00 06 | 00 00 09 00 00 16 00 58 |eld);...|.......X|
|00004320| 20 20 43 61 6c 6c 44 6f | 54 6f 46 69 65 6c 64 28 | CallDo|ToField(|
|00004330| 22 5c 70 66 54 45 56 69 | 65 77 22 2c 20 28 50 74 |"\pfTEVi|ew", (Pt|
|00004340| 72 29 20 26 66 54 45 56 | 69 65 77 2c 20 62 4f 62 |r) &fTEV|iew, bOb|
|00004350| 6a 65 63 74 2c 20 44 6f | 54 6f 46 69 65 6c 64 5f |ject, Do|ToField_|
|00004360| 53 74 61 74 69 63 4c 69 | 6e 6b 2c 20 44 6f 54 6f |StaticLi|nk, DoTo|
|00004370| 46 69 65 6c 64 29 3b 0d | 00 06 00 00 09 00 00 16 |Field);.|........|
|00004380| 00 5b 20 20 43 61 6c 6c | 44 6f 54 6f 46 69 65 6c |.[ Call|DoToFiel|
|00004390| 64 28 22 5c 70 66 4f 6c | 64 4a 75 73 74 22 2c 20 |d("\pfOl|dJust", |
|000043a0| 28 50 74 72 29 20 26 66 | 4f 6c 64 4a 75 73 74 2c |(Ptr) &f|OldJust,|
|000043b0| 20 62 49 6e 74 65 67 65 | 72 2c 20 44 6f 54 6f 46 | bIntege|r, DoToF|
|000043c0| 69 65 6c 64 5f 53 74 61 | 74 69 63 4c 69 6e 6b 2c |ield_Sta|ticLink,|
|000043d0| 20 44 6f 54 6f 46 69 65 | 6c 64 29 3b 0d ff 00 06 | DoToFie|ld);....|
|000043e0| 00 00 09 00 00 16 00 5b | 20 20 43 61 6c 6c 44 6f |.......[| CallDo|
|000043f0| 54 6f 46 69 65 6c 64 28 | 22 5c 70 66 4e 65 77 4a |ToField(|"\pfNewJ|
|00004400| 75 73 74 22 2c 20 28 50 | 74 72 29 20 26 66 4e 65 |ust", (P|tr) &fNe|
|00004410| 77 4a 75 73 74 2c 20 62 | 49 6e 74 65 67 65 72 2c |wJust, b|Integer,|
|00004420| 20 44 6f 54 6f 46 69 65 | 6c 64 5f 53 74 61 74 69 | DoToFie|ld_Stati|
|00004430| 63 4c 69 6e 6b 2c 20 44 | 6f 54 6f 46 69 65 6c 64 |cLink, D|oToField|
|00004440| 29 3b 0d 36 00 06 00 00 | 09 00 00 16 00 36 20 20 |);.6....|.....6 |
|00004450| 69 6e 68 65 72 69 74 65 | 64 3a 3a 46 69 65 6c 64 |inherite|d::Field|
|00004460| 73 28 44 6f 54 6f 46 69 | 65 6c 64 2c 20 44 6f 54 |s(DoToFi|eld, DoT|
|00004470| 6f 46 69 65 6c 64 5f 53 | 74 61 74 69 63 4c 69 6e |oField_S|taticLin|
|00004480| 6b 29 3b 0d 00 06 00 00 | 09 00 00 16 00 2d f5 7b |k);.....|.....-.{|
|00004490| 7c b0 5d 02 b1 81 0f 6d | 12 b5 98 0f 79 5f 75 0f ||.]....m|....y_u.|
|000044a0| 75 81 07 80 f7 5e 02 50 | f7 95 f7 5f 2e f0 d0 00 |u....^.P|..._....|
|000044b0| 00 06 00 00 0c 00 00 14 | 00 00 00 01 0d ff 00 06 |........|........|
|000044c0| 00 00 0c 00 00 14 00 01 | 0d ff 00 06 00 00 0c 00 |........|........|
|000044d0| 00 14 00 15 43 2b 2b 20 | 74 6f 20 50 61 73 63 61 |....C++ |to Pasca|
|000044e0| 6c 20 74 6f 20 43 2b 2b | 0d ff 00 06 00 00 0e 01 |l to C++|........|
|000044f0| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 01 f1 |........|........|
|00004500| 4e 6f 77 20 6c 65 74 d5 | 73 20 74 61 6b 65 20 61 |Now let.|s take a|
|00004510| 20 6c 6f 6f 6b 20 61 74 | 20 61 6e 6f 74 68 65 72 | look at| another|
|00004520| 20 63 61 73 65 20 74 68 | 61 74 20 6f 63 63 75 72 | case th|at occur|
|00004530| 73 20 6f 66 74 65 6e 20 | 69 6e 20 4d 61 63 41 70 |s often |in MacAp|
|00004540| 70 2e 20 20 54 68 69 73 | 20 69 73 20 77 68 65 72 |p. This| is wher|
|00004550| 65 20 79 6f 75 72 20 43 | 2b 2b 20 72 6f 75 74 69 |e your C|++ routi|
|00004560| 6e 65 20 63 61 6c 6c 73 | 20 61 20 4d 61 63 41 70 |ne calls| a MacAp|
|00004570| 70 20 70 72 6f 63 65 64 | 75 72 65 20 74 68 61 74 |p proced|ure that|
|00004580| 20 6e 65 65 64 73 20 61 | 20 50 52 4f 43 45 44 55 | needs a| PROCEDU|
|00004590| 52 45 20 72 65 66 65 72 | 65 6e 63 65 20 62 61 63 |RE refer|ence bac|
|000045a0| 6b 20 74 6f 20 6f 6e 65 | 20 6f 66 20 79 6f 75 72 |k to one| of your|
|000045b0| 20 6f 77 6e 20 72 6f 75 | 74 69 6e 65 73 2e 20 20 | own rou|tines. |
|000045c0| 46 6f 72 20 69 6e 73 74 | 61 6e 63 65 2c 20 4d 61 |For inst|ance, Ma|
|000045d0| 63 41 70 70 20 68 61 73 | 20 61 20 63 6c 61 73 73 |cApp has| a class|
|000045e0| 20 63 61 6c 6c 65 64 20 | 54 4c 69 73 74 20 74 68 | called |TList th|
|000045f0| 61 74 20 61 6c 6c 6f 77 | 73 20 79 6f 75 20 74 6f |at allow|s you to|
|00004600| 20 6d 61 69 6e 74 61 69 | 6e 20 61 20 6c 69 73 74 | maintai|n a list|
|00004610| 20 6f 66 20 6f 62 6a 65 | 63 74 73 2e 20 20 54 68 | of obje|cts. Th|
|00004620| 69 73 20 63 6c 61 73 73 | 20 68 61 73 20 61 20 6d |is class| has a m|
|00004630| 65 74 68 6f 64 20 63 61 | 6c 6c 65 64 20 45 61 63 |ethod ca|lled Eac|
|00004640| 68 20 74 68 61 74 20 61 | 6c 6c 6f 77 73 20 79 6f |h that a|llows yo|
|00004650| 75 20 74 6f 20 70 65 72 | 66 6f 72 6d 20 73 6f 6d |u to per|form som|
|00004660| 65 20 6f 70 65 72 61 74 | 69 6f 6e 20 6f 6e 20 65 |e operat|ion on e|
|00004670| 61 63 68 20 6f 62 6a 65 | 63 74 20 69 6e 20 74 68 |ach obje|ct in th|
|00004680| 65 20 6c 69 73 74 2e 20 | 20 4d 61 63 41 70 70 20 |e list. | MacApp |
|00004690| 74 61 6b 65 73 20 63 61 | 72 65 20 6f 66 20 69 74 |takes ca|re of it|
|000046a0| 65 72 61 74 69 6e 67 20 | 6f 76 65 72 20 61 6c 6c |erating |over all|
|000046b0| 20 6f 66 20 74 68 65 20 | 6f 62 6a 65 63 74 73 20 | of the |objects |
|000046c0| 61 6e 64 20 63 61 6c 6c | 73 20 61 20 72 6f 75 74 |and call|s a rout|
|000046d0| 69 6e 65 20 79 6f 75 20 | 70 61 73 73 20 74 6f 20 |ine you |pass to |
|000046e0| 69 74 20 66 6f 72 20 65 | 61 63 68 20 6f 6e 65 2e |it for e|ach one.|
|000046f0| 0d ff 00 2a 00 00 0c 00 | 00 14 00 89 0c 00 00 16 |...*....|........|
|00004700| 00 92 0c 00 00 14 00 e8 | 0c 00 00 16 00 ed 0c 00 |........|........|
|00004710| 00 14 01 3d 0c 00 00 16 | 01 41 0c 00 00 14 00 01 |...=....|.A......|
|00004720| 0d ff 00 06 00 00 0c 00 | 00 14 01 9d 46 6f 72 20 |........|....For |
|00004730| 74 68 69 73 20 65 78 61 | 6d 70 6c 65 2c 20 79 6f |this exa|mple, yo|
|00004740| 75 20 68 61 76 65 20 61 | 20 6c 69 73 74 20 6f 66 |u have a| list of|
|00004750| 20 6f 62 6a 65 63 74 73 | 20 73 74 6f 72 65 64 20 | objects| stored |
|00004760| 69 6e 20 61 20 54 4c 69 | 73 74 20 61 6e 64 20 79 |in a TLi|st and y|
|00004770| 6f 75 20 77 61 6e 74 20 | 74 6f 20 70 61 73 73 20 |ou want |to pass |
|00004780| 74 68 65 20 47 72 61 7a | 65 20 6d 65 73 73 61 67 |the Graz|e messag|
|00004790| 65 20 74 6f 20 61 6c 6c | 20 6f 66 20 74 68 65 6d |e to all| of them|
|000047a0| 2e 20 20 41 74 20 74 68 | 65 20 73 61 6d 65 20 74 |. At th|e same t|
|000047b0| 69 6d 65 2c 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |ime, you| want to|
|000047c0| 20 6b 65 65 70 20 74 72 | 61 63 6b 20 6f 66 20 68 | keep tr|ack of h|
|000047d0| 6f 77 20 6d 61 6e 79 20 | 67 72 61 7a 65 64 20 73 |ow many |grazed s|
|000047e0| 6f 20 6d 75 63 68 20 74 | 68 61 74 20 74 68 65 79 |o much t|hat they|
|000047f0| 20 66 65 6c 6c 20 6f 66 | 66 20 61 20 63 6c 69 66 | fell of|f a clif|
|00004800| 66 20 64 75 72 69 6e 67 | 20 74 68 65 20 70 72 6f |f during| the pro|
|00004810| 63 65 73 73 2e 20 20 49 | 66 20 74 68 65 20 6e 75 |cess. I|f the nu|
|00004820| 6d 62 65 72 20 6f 66 20 | 6f 62 6a 65 63 74 73 20 |mber of |objects |
|00004830| 67 72 61 7a 69 6e 67 20 | 6f 66 66 20 61 20 63 6c |grazing |off a cl|
|00004840| 69 66 66 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |iff is g|reater t|
|00004850| 68 61 6e 20 73 6f 6d 65 | 20 74 68 72 65 73 68 6f |han some| thresho|
|00004860| 6c 64 2c 20 74 68 65 6e | 20 79 6f 75 20 63 61 6c |ld, then| you cal|
|00004870| 6c 20 5f 53 79 73 42 65 | 65 70 2e 20 20 59 6f 75 |l _SysBe|ep. You|
|00004880| 20 63 6f 75 6c 64 20 75 | 73 65 20 74 68 65 20 66 | could u|se the f|
|00004890| 6f 6c 6c 6f 77 69 6e 67 | 20 70 72 6f 63 65 64 75 |ollowing| procedu|
|000048a0| 72 65 73 20 74 6f 20 61 | 63 63 6f 6d 70 6c 69 73 |res to a|ccomplis|
|000048b0| 68 20 74 68 69 73 20 69 | 6e 20 4f 62 6a 65 63 74 |h this i|n Object|
|000048c0| 20 50 61 73 63 61 6c 3a | 0d 00 00 2a 00 00 0c 00 | Pascal:|...*....|
|000048d0| 00 14 00 39 0c 00 00 16 | 00 3e 0c 00 00 14 00 58 |...9....|.>.....X|
|000048e0| 0c 00 00 16 00 5d 0c 00 | 00 14 01 46 0c 00 00 16 |.....]..|...F....|
|000048f0| 01 4e 0c 00 00 14 00 26 | 00 00 f6 df 79 f4 74 6f |.N.....&|....y.to|
|00004900| 7a 14 f4 c7 82 f2 df 3e | f4 56 cb f2 8f 44 5f 47 |z......>|.V...D_G|
|00004910| 46 f7 a1 f2 c0 37 af 29 | f3 bf 0d 00 00 06 00 00 |F....7.)|........|
|00004920| 09 00 00 16 00 06 00 02 | 7d 0d 00 06 00 00 09 00 |........|}.......|
|00004930| 00 16 00 16 00 13 20 20 | 20 20 6d 79 4c 69 73 74 |...... | myList|
|00004940| 3a 20 54 4c 69 73 74 3b | 0d 0f 00 06 00 00 09 00 |: TList;|........|
|00004950| 00 16 00 01 0d 15 00 06 | 00 00 09 00 00 16 00 25 |........|.......%|
|00004960| 20 20 50 52 4f 43 45 44 | 55 52 45 20 54 4d 79 41 | PROCED|URE TMyA|
|00004970| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 47 72 61 7a 65 |pplicati|on.Graze|
|00004980| 41 6c 6c 3b 0d 34 00 06 | 00 00 09 00 00 16 00 01 |All;.4..|........|
|00004990| 0d 06 00 06 00 00 09 00 | 00 16 00 08 20 20 20 20 |........|.... |
|000049a0| 56 41 52 0d 00 06 00 00 | 09 00 00 16 00 1c 20 20 |VAR.....|...... |
|000049b0| 20 20 20 20 6f 66 66 54 | 68 65 43 6c 69 66 66 3a | offT|heCliff:|
|000049c0| 20 69 6e 74 65 67 65 72 | 3b 0d 00 06 00 00 09 00 | integer|;.......|
|000049d0| 00 16 00 01 0d 08 00 06 | 00 00 09 00 00 16 00 2b |........|.......+|
|000049e0| 20 20 20 20 50 52 4f 43 | 45 44 55 52 45 20 44 6f | PROC|EDURE Do|
|000049f0| 47 72 61 7a 65 28 74 68 | 65 4f 62 6a 65 63 74 3a |Graze(th|eObject:|
|00004a00| 20 54 4f 62 6a 65 63 74 | 29 3b 0d 00 00 06 00 00 | TObject|);......|
|00004a10| 09 00 00 16 00 01 0d 00 | 00 06 00 00 09 00 00 16 |........|........|
|00004a20| 00 0c 20 20 20 20 20 20 | 42 45 47 49 4e 0d 00 06 |.. |BEGIN...|
|00004a30| 00 00 09 00 00 16 00 22 | 20 20 20 20 20 20 20 20 |......."| |
|00004a40| 54 47 72 61 7a 65 72 28 | 74 68 65 4f 62 6a 65 63 |TGrazer(|theObjec|
|00004a50| 74 29 2e 47 72 61 7a 65 | 3b 0d 00 06 00 00 09 00 |t).Graze|;.......|
|00004a60| 00 16 00 35 20 20 20 20 | 20 20 20 20 49 46 20 54 |...5 | IF T|
|00004a70| 47 72 61 7a 65 72 28 74 | 68 65 4f 62 6a 65 63 74 |Grazer(t|heObject|
|00004a80| 29 2e 47 72 61 7a 65 64 | 4f 66 66 54 68 65 43 6c |).Grazed|OffTheCl|
|00004a90| 69 66 66 20 54 48 45 4e | 0d 55 00 06 00 00 09 00 |iff THEN|.U......|
|00004aa0| 00 16 00 2a 20 20 20 20 | 20 20 20 20 20 20 6f 66 |...* | of|
|00004ab0| 66 54 68 65 43 6c 69 66 | 66 20 3a 3d 20 6f 66 66 |fTheClif|f := off|
|00004ac0| 54 68 65 63 6c 69 66 66 | 20 2b 20 31 3b 0d 00 06 |Thecliff| + 1;...|
|00004ad0| 00 00 09 00 00 16 00 34 | 20 20 20 20 20 20 20 20 |.......4| |
|00004ae0| 49 46 20 6f 66 66 54 68 | 65 43 6c 69 66 66 20 3e |IF offTh|eCliff >|
|00004af0| 20 53 45 4c 46 2e 66 43 | 6c 69 66 66 54 68 72 65 | SELF.fC|liffThre|
|00004b00| 73 68 68 6f 6c 64 20 54 | 48 45 4e 0d 00 06 00 00 |shhold T|HEN.....|
|00004b10| 09 00 00 16 00 1b 20 20 | 20 20 20 20 20 20 20 20 |...... | |
|00004b20| 41 70 70 6c 69 63 61 74 | 69 6f 6e 42 65 65 70 3b |Applicat|ionBeep;|
|00004b30| 0d ff 00 06 00 00 09 00 | 00 16 00 0b 20 20 20 20 |........|.... |
|00004b40| 20 20 45 4e 44 3b 0d ff | 00 06 00 00 09 00 00 16 | END;..|........|
|00004b50| 00 01 0d 00 00 06 00 00 | 09 00 00 16 00 0a 20 20 |........|...... |
|00004b60| 20 20 42 45 47 49 4e 0d | 00 06 00 00 09 00 00 16 | BEGIN.|........|
|00004b70| 00 18 20 20 20 20 20 20 | 6f 66 66 54 68 65 43 6c |.. |offTheCl|
|00004b80| 69 66 66 20 3a 3d 20 30 | 3b 0d 00 06 00 00 09 00 |iff := 0|;.......|
|00004b90| 00 16 00 22 20 20 20 20 | 20 20 6d 79 47 72 61 7a |..." | myGraz|
|00004ba0| 65 72 4c 69 73 74 2e 45 | 61 63 68 28 44 6f 47 72 |erList.E|ach(DoGr|
|00004bb0| 61 7a 65 29 3b 0d 00 06 | 00 00 09 00 00 16 00 29 |aze);...|.......)|
|00004bc0| e6 8c 6a 0f 76 57 90 f5 | 4f 4d f7 9f 41 ee a7 c6 |..j.vW..|OM..A...|
|00004bd0| 27 53 f3 af 3a f4 74 6f | 7a 1f 41 aa f2 8f 29 0f |'S..:.to|z.A...).|
|00004be0| 7b f0 d0 00 00 06 00 00 | 09 00 00 16 01 44 01 68 |{.......|.....D.h|
|00004bf0| 00 00 00 01 0d ff 00 06 | 00 00 09 00 00 16 00 14 |........|........|
|00004c00| 01 7d 59 6f 75 20 75 73 | 65 20 61 20 6e 65 73 74 |.}You us|e a nest|
|00004c10| 65 64 20 70 72 6f 63 65 | 64 75 72 65 20 73 6f 20 |ed proce|dure so |
|00004c20| 74 68 61 74 20 44 6f 47 | 72 61 7a 65 20 63 61 6e |that DoG|raze can|
|00004c30| 20 61 63 63 65 73 73 20 | 74 68 65 20 6c 6f 63 61 | access |the loca|
|00004c40| 6c 20 76 61 72 69 61 62 | 6c 65 20 6f 66 66 54 68 |l variab|le offTh|
|00004c50| 65 43 6c 69 66 66 2e 20 | 20 54 68 69 73 20 61 6c |eCliff. | This al|
|00004c60| 6c 6f 77 73 20 79 6f 75 | 20 74 6f 20 75 73 65 20 |lows you| to use |
|00004c70| 61 20 76 61 72 69 61 62 | 6c 65 20 74 68 61 74 20 |a variab|le that |
|00004c80| 68 61 73 20 6c 69 6d 69 | 74 65 64 20 73 63 6f 70 |has limi|ted scop|
|00004c90| 65 20 61 6e 64 20 74 68 | 61 74 20 69 73 20 63 72 |e and th|at is cr|
|00004ca0| 65 61 74 65 64 20 64 79 | 6e 61 6d 69 63 61 6c 6c |eated dy|namicall|
|00004cb0| 79 20 73 6f 20 74 68 61 | 74 20 79 6f 75 20 64 6f |y so tha|t you do|
|00004cc0| 6e d5 74 20 68 61 76 65 | 20 74 6f 20 61 6c 6c 6f |n.t have| to allo|
|00004cd0| 63 61 74 65 20 61 20 67 | 6c 6f 62 61 6c 20 76 61 |cate a g|lobal va|
|00004ce0| 72 69 61 62 6c 65 2e 20 | 20 41 6c 73 6f 2c 20 73 |riable. | Also, s|
|00004cf0| 69 6e 63 65 20 44 6f 47 | 72 61 7a 65 20 69 73 20 |ince DoG|raze is |
|00004d00| 65 6d 62 65 64 64 65 64 | 20 77 69 74 68 69 6e 20 |embedded| within |
|00004d10| 61 20 54 4d 79 41 70 70 | 6c 69 63 61 74 69 6f 6e |a TMyApp|lication|
|00004d20| 20 6d 65 74 68 6f 64 2c | 20 79 6f 75 20 68 61 76 | method,| you hav|
|00004d30| 65 20 61 63 63 65 73 73 | 20 74 6f 20 74 68 65 20 |e access| to the |
|00004d40| 74 68 69 73 20 73 79 6d | 62 6f 6c 20 28 74 68 69 |this sym|bol (thi|
|00004d50| 73 20 69 73 20 74 68 65 | 20 65 71 75 69 76 61 6c |s is the| equival|
|00004d60| 65 6e 74 20 74 6f 20 53 | 45 4c 46 20 69 6e 20 4f |ent to S|ELF in O|
|00004d70| 62 6a 65 63 74 20 50 61 | 73 63 61 6c 29 2e 0d 00 |bject Pa|scal)...|
|00004d80| 00 5a 00 00 0c 00 00 14 | 00 23 0c 00 00 16 00 2a |.Z......|.#.....*|
|00004d90| 0c 00 00 14 00 49 0c 00 | 00 16 00 54 0c 00 00 14 |.....I..|...T....|
|00004da0| 00 f3 0c 00 00 16 00 fa | 0c 00 00 14 01 10 0c 00 |........|........|
|00004db0| 00 16 01 1e 0c 00 00 14 | 01 3e 0c 00 00 16 01 42 |........|.>.....B|
|00004dc0| 0c 00 00 14 01 4b 0c 00 | 00 16 01 4f 0c 00 00 14 |.....K..|...O....|
|00004dd0| 01 65 0c 00 00 16 01 69 | 0c 00 00 14 00 01 0d 00 |.e.....i|........|
|00004de0| 00 06 00 00 0c 00 00 14 | 01 12 54 68 65 72 65 66 |........|..Theref|
|00004df0| 6f 72 65 2c 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |ore, the| problem|
|00004e00| 20 66 6f 72 20 43 2b 2b | 20 70 72 6f 67 72 61 6d | for C++| program|
|00004e10| 6d 65 72 73 20 68 65 72 | 65 20 69 73 20 74 68 61 |mers her|e is tha|
|00004e20| 74 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 69 6d |t there |is no im|
|00004e30| 70 6c 69 63 69 74 20 73 | 75 70 70 6f 72 74 20 66 |plicit s|upport f|
|00004e40| 6f 72 20 67 65 74 74 69 | 6e 67 20 61 63 63 65 73 |or getti|ng acces|
|00004e50| 73 20 74 6f 20 6c 6f 63 | 61 6c 20 76 61 72 69 61 |s to loc|al varia|
|00004e60| 62 6c 65 73 2c 20 73 75 | 63 68 20 61 73 20 6f 66 |bles, su|ch as of|
|00004e70| 66 54 68 65 43 6c 69 66 | 66 2c 20 61 73 20 77 65 |fTheClif|f, as we|
|00004e80| 6c 6c 20 61 73 20 74 68 | 65 20 72 65 66 65 72 65 |ll as th|e refere|
|00004e90| 6e 63 65 20 74 6f 20 74 | 68 65 20 63 6f 72 72 65 |nce to t|he corre|
|00004ea0| 63 74 20 6f 62 6a 65 63 | 74 20 74 68 72 6f 75 67 |ct objec|t throug|
|00004eb0| 68 20 74 68 69 73 2e 20 | 20 53 6f 20 77 68 61 74 |h this. | So what|
|00004ec0| d5 73 20 74 68 65 20 61 | 6c 74 65 72 6e 61 74 69 |.s the a|lternati|
|00004ed0| 76 65 20 66 6f 72 20 43 | 2b 2b 20 70 72 6f 67 72 |ve for C|++ progr|
|00004ee0| 61 6d 6d 65 72 73 20 69 | 6e 20 61 20 63 61 73 65 |ammers i|n a case|
|00004ef0| 20 6c 69 6b 65 20 74 68 | 69 73 3f 0d 00 1e 00 00 | like th|is?.....|
|00004f00| 0c 00 00 14 00 84 0c 00 | 00 16 00 8f 0c 00 00 14 |........|........|
|00004f10| 00 c8 0c 00 00 16 00 cc | 0c 00 00 14 00 01 0d 00 |........|........|
|00004f20| 00 06 00 00 0c 00 00 14 | 00 43 46 69 72 73 74 2c |........|.CFirst,|
|00004f30| 20 6c 65 74 d5 73 20 74 | 61 6b 65 20 61 20 71 75 | let.s t|ake a qu|
|00004f40| 69 63 6b 20 6c 6f 6f 6b | 20 61 74 20 68 6f 77 20 |ick look| at how |
|00004f50| 74 68 65 20 45 61 63 68 | 20 6d 65 74 68 6f 64 20 |the Each| method |
|00004f60| 69 73 20 64 65 63 6c 61 | 72 65 64 3a 0d ff 00 12 |is decla|red:....|
|00004f70| 00 00 0c 00 00 14 00 2a | 0c 00 00 16 00 2e 0c 00 |.......*|........|
|00004f80| 00 14 00 01 0d ff 00 06 | 00 00 0c 00 00 14 00 0e |........|........|
|00004f90| 4f 62 6a 65 63 74 20 50 | 61 73 63 61 6c 0d 00 06 |Object P|ascal...|
|00004fa0| 00 00 0c 01 00 14 00 1e | 20 20 20 20 28 54 47 72 |........| (TGr|
|00004fb0| 61 7a 65 72 20 2a 29 69 | 74 65 6d 2d 3e 47 72 61 |azer *)i|tem->Gra|
|00004fc0| 7a 65 28 29 3b 0d 00 06 | 00 00 09 00 00 16 00 20 |ze();...|....... |
|00004fd0| f5 06 88 06 0f 5a 14 50 | d5 40 2b 10 f5 32 62 7c |.....Z.P|.@+..2b||
|00004fe0| 0f 4c 73 f6 bf 0d 00 06 | 00 00 0c 01 00 14 41 72 |.Ls.....|......Ar|
|00004ff0| 72 61 79 29 0d ff 00 06 | 00 00 09 00 00 16 00 06 |ray)....|........|
|00005000| 20 20 2e 2e 2e 0d 00 06 | 00 00 09 00 00 16 00 3b | ......|.......;|
|00005010| 20 20 50 52 4f 43 45 44 | 55 52 45 20 54 4c 69 73 | PROCED|URE TLis|
|00005020| 74 2e 45 61 63 68 28 50 | 52 4f 43 45 44 55 52 45 |t.Each(P|ROCEDURE|
|00005030| 20 44 6f 54 6f 49 74 65 | 6d 28 69 74 65 6d 3a 20 | DoToIte|m(item: |
|00005040| 54 4f 62 6a 65 63 74 29 | 29 3b 0d 5e 00 06 00 00 |TObject)|);.^....|
|00005050| 09 00 00 16 00 06 20 20 | 2e 2e 2e 0d 00 06 00 00 |...... |........|
|00005060| 09 00 00 16 00 07 20 20 | 45 4e 44 3b 0d ff 00 06 |...... |END;....|
|00005070| 00 00 09 00 00 16 00 01 | 0d ff 00 06 00 00 09 00 |........|........|
|00005080| 00 16 00 04 43 2b 2b 0d | 00 06 00 00 0c 01 00 14 |....C++.|........|
|00005090| 00 01 0d ff 00 06 00 00 | 0c 00 00 14 00 25 63 6c |........|.....%cl|
|000050a0| 61 73 73 20 54 4c 69 73 | 74 20 3a 20 70 75 62 6c |ass TLis|t : publ|
|000050b0| 69 63 20 54 44 79 6e 61 | 6d 69 63 41 72 72 61 79 |ic TDyna|micArray|
|000050c0| 20 7b 0d ff 00 06 00 00 | 09 00 00 16 00 0a 20 20 | {......|...... |
|000050d0| 70 75 62 6c 69 63 3a 0d | 00 06 00 00 09 00 00 16 |public:.|........|
|000050e0| 00 06 20 20 2e 2e 2e 0d | 00 06 00 00 09 00 00 16 |.. ....|........|
|000050f0| 00 47 20 20 76 69 72 74 | 75 61 6c 20 70 61 73 63 |.G virt|ual pasc|
|00005100| 61 6c 20 76 6f 69 64 20 | 45 61 63 68 28 70 61 73 |al void |Each(pas|
|00005110| 63 61 6c 20 76 6f 69 64 | 20 28 2a 44 6f 54 6f 49 |cal void| (*DoToI|
|00005120| 74 65 6d 29 28 54 4f 62 | 6a 65 63 74 20 2a 69 74 |tem)(TOb|ject *it|
|00005130| 65 6d 2c 20 76 6f 69 64 | 0d ff 00 06 00 00 09 00 |em, void|........|
|00005140| 00 16 00 4e 20 20 20 20 | 20 20 20 20 20 20 20 20 |...N | |
|00005150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00005160| 44 6f 54 6f 49 74 65 6d | 5f 53 74 61 74 69 63 4c |DoToItem|_StaticL|
|00005170| 69 6e 6b 29 2c 20 76 6f | 69 64 20 2a 44 6f 54 6f |ink), vo|id *DoTo|
|00005180| 49 74 65 6d 5f 53 74 61 | 74 69 63 4c 69 6e 6b 29 |Item_Sta|ticLink)|
|00005190| 3b 0d 00 06 00 00 09 00 | 00 16 00 06 20 20 2e 2e |;.......|.... ..|
|000051a0| 2e 0d 00 06 00 00 09 00 | 00 16 00 2c 00 00 f6 df |........|...,....|
|000051b0| 79 f4 74 6f 7a 14 f4 c7 | 82 f2 df 3e f4 56 cb f2 |y.toz...|...>.V..|
|000051c0| 8f 44 5f 47 46 f7 a1 f2 | c0 f2 6f 6d f7 9f 4c 5c |.D_GF...|..om..L\|
|000051d0| 6a 8f 29 f3 bf 0d 00 06 | 00 00 09 00 00 16 00 00 |j.).....|........|
|000051e0| 0c 00 00 14 01 0f 41 73 | 20 79 6f 75 20 63 61 6e |......As| you can|
|000051f0| 20 73 65 65 2c 20 74 68 | 65 20 74 77 6f 20 63 6f | see, th|e two co|
|00005200| 6d 70 6f 6e 65 6e 74 73 | 20 6f 66 20 74 68 65 20 |mponents| of the |
|00005210| 50 52 4f 43 45 44 55 52 | 45 20 70 61 72 61 6d 65 |PROCEDUR|E parame|
|00005220| 74 65 72 20 68 61 76 65 | 20 74 6f 20 62 65 20 64 |ter have| to be d|
|00005230| 65 63 6c 61 72 65 64 20 | 65 78 70 6c 69 63 69 74 |eclared |explicit|
|00005240| 6c 79 20 69 6e 20 43 2b | 2b 2e 20 20 42 65 63 61 |ly in C+|+. Beca|
|00005250| 75 73 65 20 6f 66 20 74 | 68 69 73 2c 20 79 6f 75 |use of t|his, you|
|00005260| 20 63 61 6e 20 63 6f 6d | 65 20 75 70 20 77 69 74 | can com|e up wit|
|00005270| 68 20 66 6f 75 72 20 64 | 69 66 66 65 72 65 6e 74 |h four d|ifferent|
|00005280| 20 73 6f 6c 75 74 69 6f | 6e 73 20 74 6f 20 74 68 | solutio|ns to th|
|00005290| 65 20 70 72 6f 62 6c 65 | 6d 2c 20 61 6e 64 20 61 |e proble|m, and a|
|000052a0| 6c 6c 20 6f 66 20 74 68 | 65 6d 20 68 69 6e 67 65 |ll of th|em hinge|
|000052b0| 20 6f 6e 20 62 65 69 6e | 67 20 63 72 65 61 74 69 | on bein|g creati|
|000052c0| 76 65 20 77 69 74 68 20 | 77 68 61 74 20 79 6f 75 |ve with |what you|
|000052d0| 20 70 61 73 73 20 66 6f | 72 20 74 68 65 20 73 74 | pass fo|r the st|
|000052e0| 61 74 69 63 20 6c 69 6e | 6b 20 70 61 72 61 6d 65 |atic lin|k parame|
|000052f0| 74 65 72 2e 0d ff 00 12 | 00 00 0c 00 00 14 00 2a |ter.....|.......*|
|00005300| 0c 00 00 16 00 33 0c 00 | 00 14 00 1e 00 00 f6 df |.....3..|........|
|00005310| 79 f4 c5 c6 a8 f2 e5 dd | f5 4b 1f 43 a7 dd 0f 3d |y.......|.K.C...=|
|00005320| 0f 30 f3 bf 0d 00 00 06 | 00 00 09 00 00 16 01 20 |.0......|....... |
|00005330| 01 44 01 68 00 00 00 00 | 00 7d 31 29 09 43 61 73 |.D.h....|.}1).Cas|
|00005340| 65 3a 20 20 59 6f 75 20 | 6e 65 65 64 20 61 63 63 |e: You |need acc|
|00005350| 65 73 73 20 74 6f 20 74 | 68 69 73 2c 20 62 75 74 |ess to t|his, but|
|00005360| 20 64 6f 6e d5 74 20 6e | 65 65 64 20 74 6f 20 61 | don.t n|eed to a|
|00005370| 63 63 65 73 73 20 61 6e | 79 20 6c 6f 63 61 6c 20 |ccess an|y local |
|00005380| 76 61 72 69 61 62 6c 65 | 73 2e 20 20 50 61 73 73 |variable|s. Pass|
|00005390| 20 74 68 69 73 20 69 6e | 20 44 6f 54 6f 49 74 65 | this in| DoToIte|
|000053a0| 6d 5f 53 74 61 74 69 63 | 4c 69 6e 6b 20 64 69 72 |m_Static|Link dir|
|000053b0| 65 63 74 6c 79 2e 0d ff | 00 2a 00 00 0c 00 00 14 |ectly...|.*......|
|000053c0| 00 1d 0c 00 00 16 00 21 | 0c 00 00 14 00 57 0c 00 |.......!|.....W..|
|000053d0| 00 16 00 5b 0c 00 00 14 | 00 5f 0c 00 00 16 00 72 |...[....|._.....r|
|000053e0| 0c 00 00 14 00 01 0d ff | 00 06 00 00 0c 00 00 14 |........|........|
|000053f0| 00 87 32 29 09 43 61 73 | 65 3a 20 20 59 6f 75 20 |..2).Cas|e: You |
|00005400| 6e 65 65 64 20 61 63 63 | 65 73 73 20 74 6f 20 61 |need acc|ess to a|
|00005410| 20 73 69 6e 67 6c 65 20 | 6c 6f 63 61 6c 20 76 61 | single |local va|
|00005420| 72 69 61 62 6c 65 2c 20 | 62 75 74 20 6e 6f 74 20 |riable, |but not |
|00005430| 53 45 4c 46 2e 20 20 50 | 61 73 73 20 74 68 65 20 |SELF. P|ass the |
|00005440| 72 65 66 65 72 65 6e 63 | 65 20 74 6f 20 74 68 61 |referenc|e to tha|
|00005450| 74 20 6c 6f 63 61 6c 20 | 76 61 72 69 61 62 6c 65 |t local |variable|
|00005460| 20 69 6e 20 44 6f 54 6f | 49 74 65 6d 5f 53 74 61 | in DoTo|Item_Sta|
|00005470| 74 69 63 4c 69 6e 6b 2e | 0d ff 00 1e 00 00 0c 00 |ticLink.|........|
|00005480| 00 14 00 3e 0c 00 00 16 | 00 42 0c 00 00 14 00 72 |...>....|.B.....r|
|00005490| 0c 00 00 16 00 85 0c 00 | 00 14 00 01 0d ff 00 06 |........|........|
|000054a0| 00 00 0c 00 00 14 00 ab | 33 29 09 43 61 73 65 3a |........|3).Case:|
|000054b0| 20 20 59 6f 75 20 6e 65 | 65 64 20 61 63 63 65 73 | You ne|ed acces|
|000054c0| 73 20 74 6f 20 6d 75 6c | 74 69 70 6c 65 20 61 6d |s to mul|tiple am|
|000054d0| 6f 75 6e 74 73 20 6f 66 | 20 69 6e 66 6f 72 6d 61 |ounts of| informa|
|000054e0| 74 69 6f 6e 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |tion, in|cluding |
|000054f0| 6d 6f 72 65 20 74 68 61 | 6e 20 6f 6e 65 20 6c 6f |more tha|n one lo|
|00005500| 63 61 6c 20 76 61 72 69 | 61 62 6c 65 20 61 6e 64 |cal vari|able and|
|00005510| 20 74 68 69 73 2e 20 20 | 50 61 73 73 20 61 20 70 | this. |Pass a p|
|00005520| 6f 69 6e 74 65 72 20 74 | 6f 20 61 20 73 74 72 75 |ointer t|o a stru|
|00005530| 63 74 20 74 68 61 74 20 | 63 6f 6e 74 61 69 6e 73 |ct that |contains|
|00005540| 20 74 68 69 73 20 69 6e | 66 6f 72 6d 61 74 69 6f | this in|formatio|
|00005550| 6e 2e 0d ff 00 1e 00 00 | 0c 00 00 14 00 69 0c 00 |n.......|.....i..|
|00005560| 00 16 00 6d 0c 00 00 14 | 00 84 0c 00 00 16 00 8a |...m....|........|
|00005570| 0c 00 00 14 00 01 0d 4f | 00 06 00 00 0c 00 00 14 |.......O|........|
|00005580| 00 1a 00 00 f6 df 79 f4 | c5 c6 a8 f2 e8 1a d0 f3 |......y.|........|
|00005590| d0 2b 78 f3 bf 0d 00 06 | 00 00 09 00 00 16 65 73 |.+x.....|......es|
|000055a0| 73 20 74 6f 00 18 00 00 | a5 c6 af 56 64 80 f6 df |s to....|...Vd...|
|000055b0| 79 f4 c5 c6 a8 f3 bf 0d | 00 06 00 00 09 00 00 16 |y.......|........|
|000055c0| 65 64 75 72 65 20 00 29 | e6 8c 6a 0f 76 57 90 f5 |edure .)|..j.vW..|
|000055d0| 4f 4d f7 9f 41 ee a7 c6 | 27 53 f3 af 3a f4 74 6f |OM..A...|'S..:.to|
|000055e0| 7a 1f 41 aa f2 8f 29 0f | 7b f0 d0 00 00 06 00 00 |z.A...).|{.......|
|000055f0| 09 00 00 16 4e 49 4c 20 | 66 6f 00 06 00 00 f7 df |....NIL |fo......|
|00005600| 0d 00 00 06 00 00 09 00 | 00 16 00 1b 00 00 00 00 |........|........|
|00005610| f4 1e ea 7c 62 75 3f 42 | 11 ef 28 f2 9f 3b f0 d0 |...|bu?B|..(..;..|
|00005620| 00 06 00 00 09 00 00 16 | 00 75 0c 00 00 14 00 00 |........|.u......|
|00005630| 00 06 00 00 f7 df 0d 00 | 00 06 00 00 09 00 00 16 |........|........|
|00005640| 00 01 0d 8d 00 06 00 00 | 0c 00 00 14 00 01 0d 32 |........|.......2|
|00005650| 00 06 00 00 0c 01 00 14 | 0c 00 00 14 00 2c 4e 6f |........|.....,No|
|00005660| 77 20 74 6f 20 6c 6f 6f | 6b 20 61 74 20 65 61 63 |w to loo|k at eac|
|00005670| 68 20 6f 66 20 74 68 65 | 73 65 20 69 6e 20 6d 6f |h of the|se in mo|
|00005680| 72 65 20 64 65 70 74 68 | 2e 0d 00 06 00 00 0c 00 |re depth|........|
|00005690| 00 14 00 01 0d 5a 00 06 | 00 00 0c 00 00 14 00 2a |.....Z..|.......*|
|000056a0| 50 61 73 73 20 74 68 69 | 73 20 69 6e 20 44 6f 54 |Pass thi|s in DoT|
|000056b0| 6f 49 74 65 6d 5f 53 74 | 61 74 69 63 4c 69 6e 6b |oItem_St|aticLink|
|000056c0| 20 44 69 72 65 63 74 6c | 79 0d 00 12 00 00 0c 01 | Directl|y.......|
|000056d0| 00 14 00 05 0c 01 00 16 | 00 09 0c 01 00 14 00 01 |........|........|
|000056e0| 0d 03 00 06 00 00 0c 00 | 00 14 01 73 54 68 69 73 |........|...sThis|
|000056f0| 20 69 73 20 74 68 65 20 | 61 70 70 72 6f 61 63 68 | is the |approach|
|00005700| 20 77 68 65 72 65 20 79 | 6f 75 20 77 6f 75 6c 64 | where y|ou would|
|00005710| 20 70 61 73 73 20 74 68 | 69 73 20 61 73 20 74 68 | pass th|is as th|
|00005720| 65 20 44 6f 54 6f 49 74 | 65 6d 5f 53 74 61 74 69 |e DoToIt|em_Stati|
|00005730| 63 4c 69 6e 6b 20 76 61 | 6c 75 65 2e 20 20 59 6f |cLink va|lue. Yo|
|00005740| 75 20 77 6f 75 6c 64 20 | 77 61 6e 74 20 74 6f 20 |u would |want to |
|00005750| 64 6f 20 74 68 69 73 20 | 69 66 20 79 6f 75 20 6e |do this |if you n|
|00005760| 65 65 64 65 64 20 74 6f | 20 61 63 63 65 73 73 20 |eeded to| access |
|00005770| 79 6f 75 72 20 6f 62 6a | 65 63 74 2c 20 62 75 74 |your obj|ect, but|
|00005780| 20 64 69 64 6e d5 74 20 | 6e 65 65 64 20 74 6f 20 | didn.t |need to |
|00005790| 61 63 63 65 73 73 20 61 | 6e 79 20 6c 6f 63 61 6c |access a|ny local|
|000057a0| 20 76 61 72 69 61 62 6c | 65 73 2e 20 20 48 65 72 | variabl|es. Her|
|000057b0| 65 d5 73 20 77 68 61 74 | 20 73 6f 6d 65 20 43 2b |e.s what| some C+|
|000057c0| 2b 20 63 6f 64 65 20 77 | 6f 75 6c 64 20 6c 6f 6f |+ code w|ould loo|
|000057d0| 6b 20 6c 69 6b 65 20 75 | 73 69 6e 67 20 74 68 69 |k like u|sing thi|
|000057e0| 73 20 6d 65 74 68 6f 64 | 2e 20 20 59 6f 75 20 70 |s method|. You p|
|000057f0| 61 73 73 20 74 68 69 73 | 20 61 73 20 74 68 65 20 |ass this| as the |
|00005800| 73 74 61 74 69 63 20 6c | 69 6e 6b 20 70 61 72 61 |static l|ink para|
|00005810| 6d 65 74 65 72 20 61 6e | 64 20 63 6f 6e 76 65 72 |meter an|d conver|
|00005820| 74 20 69 74 20 62 61 63 | 6b 20 69 6e 74 6f 20 61 |t it bac|k into a|
|00005830| 6e 20 6f 62 6a 65 63 74 | 20 72 65 66 65 72 65 6e |n object| referen|
|00005840| 63 65 20 69 6e 20 79 6f | 75 72 20 63 61 6c 6c 62 |ce in yo|ur callb|
|00005850| 61 63 6b 20 70 72 6f 63 | 65 64 75 72 65 2e 0d a3 |ack proc|edure...|
|00005860| 00 2a 00 00 0c 00 00 14 | 00 2a 0c 00 00 16 00 2e |.*......|.*......|
|00005870| 0c 00 00 14 00 36 0c 00 | 00 16 00 49 0c 00 00 14 |.....6..|...I....|
|00005880| 01 08 0c 00 00 16 01 0c | 0c 00 00 14 00 48 00 00 |........|.....H..|
|00005890| 7d 0f 28 b5 82 f4 c5 c6 | a8 f2 df 3e 5d df 54 b1 |}.(.....|...>].T.|
|000058a0| f4 3a 7d d0 f3 e0 b5 82 | f4 c5 c6 a8 f2 df 3e 81 |.:}.....|......>.|
|000058b0| ad f2 df 3e df 43 a7 dd | f5 4b 41 8b b5 a9 f2 90 |...>.C..|.KA.....|
|000058c0| f7 bf 0d 00 00 06 00 00 | 09 00 00 16 61 7a 65 28 |........|....aze(|
|000058d0| 54 4f 62 6a 65 63 74 2a | 20 69 74 65 6d 2c 00 0d |TObject*| item,..|
|000058e0| f7 d0 a5 c6 af 56 64 8f | 3b f0 d0 00 00 06 00 00 |.....Vd.|;.......|
|000058f0| 09 00 00 16 00 06 00 00 | 09 00 00 16 00 1a 20 20 |........|...... |
|00005900| 20 20 54 4d 79 41 70 70 | 6c 69 63 61 74 69 6f 6e | TMyApp|lication|
|00005910| 20 2a 73 65 6c 66 3b 0d | 00 06 00 00 09 00 00 16 | *self;.|........|
|00005920| 00 01 0d 00 00 06 00 00 | 09 00 00 16 00 2a 20 20 |........|.....* |
|00005930| 20 20 73 65 6c 66 20 3d | 20 28 54 4d 79 41 70 70 | self =| (TMyApp|
|00005940| 6c 69 63 61 74 69 6f 6e | 20 2a 29 20 73 74 61 74 |lication| *) stat|
|00005950| 69 63 4c 69 6e 6b 3b 0d | 00 06 00 00 09 00 00 16 |icLink;.|........|
|00005960| 00 1d 20 20 20 20 73 65 | 6c 66 2d 3e 44 6f 53 6f |.. se|lf->DoSo|
|00005970| 6d 65 74 68 69 6e 67 45 | 6c 73 65 28 29 3b 0d 00 |methingE|lse();..|
|00005980| 00 06 00 00 09 00 00 16 | 00 1e 20 20 20 20 28 54 |........|.. (T|
|00005990| 47 72 61 7a 65 72 20 2a | 29 69 74 65 6d 2d 3e 47 |Grazer *|)item->G|
|000059a0| 72 61 7a 65 28 29 3b 0d | 00 06 00 00 09 00 00 16 |raze();.|........|
|000059b0| 00 02 7d 0d 00 06 00 00 | 09 00 00 16 00 01 0d 00 |..}.....|........|
|000059c0| 00 06 00 00 09 00 00 16 | 00 29 70 61 73 63 61 6c |........|.)pascal|
|000059d0| 20 76 6f 69 64 20 54 4d | 79 41 70 70 6c 69 63 61 | void TM|yApplica|
|000059e0| 74 69 6f 6e 3a 3a 47 72 | 61 7a 65 41 6c 6c 28 29 |tion::Gr|azeAll()|
|000059f0| 20 7b 0d 00 00 06 00 00 | 09 00 00 16 00 01 0d 00 | {......|........|
|00005a00| 00 06 00 00 09 00 00 16 | 00 27 20 20 20 20 6d 79 |........|.' my|
|00005a10| 47 72 61 7a 65 72 4c 69 | 73 74 2d 3e 45 61 63 68 |GrazerLi|st->Each|
|00005a20| 28 44 6f 47 72 61 7a 65 | 2c 20 74 68 69 73 29 3b |(DoGraze|, this);|
|00005a30| 0d 00 00 06 00 00 09 00 | 00 16 00 25 00 00 00 00 |........|...%....|
|00005a40| f2 bf 2b f2 8b 58 2f 4c | 5c 6a 8f 2d f3 e5 dd f5 |..+..X/L|\j.-....|
|00005a50| 4b 1f 43 a7 dd f2 9f 3b | f0 d0 00 06 00 00 09 00 |K.C....;|........|
|00005a60| 00 16 01 68 00 00 00 00 | 00 01 0d 00 00 06 00 00 |...h....|........|
|00005a70| 0c 00 00 14 00 45 50 61 | 73 73 20 74 68 65 20 52 |.....EPa|ss the R|
|00005a80| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 61 20 53 69 |eference| to a Si|
|00005a90| 6e 67 6c 65 20 4c 6f 63 | 61 6c 20 56 61 72 69 61 |ngle Loc|al Varia|
|00005aa0| 62 6c 65 20 69 6e 20 44 | 6f 54 6f 49 74 65 6d 5f |ble in D|oToItem_|
|00005ab0| 53 74 61 74 69 63 4c 69 | 6e 6b 0d 00 00 06 00 00 |StaticLi|nk......|
|00005ac0| 0c 01 00 14 00 01 0d 00 | 00 06 00 00 0a 00 00 14 |........|........|
|00005ad0| 00 c3 59 6f 75 20 77 6f | 75 6c 64 20 75 73 65 20 |..You wo|uld use |
|00005ae0| 74 68 69 73 20 6d 65 74 | 68 6f 64 20 69 66 20 61 |this met|hod if a|
|00005af0| 6c 6c 20 79 6f 75 20 68 | 61 64 20 74 6f 20 64 6f |ll you h|ad to do|
|00005b00| 20 77 61 73 20 61 63 63 | 65 73 73 20 61 20 6c 6f | was acc|ess a lo|
|00005b10| 63 61 6c 20 76 61 72 69 | 61 62 6c 65 20 6f 66 20 |cal vari|able of |
|00005b20| 79 6f 75 72 20 68 6f 73 | 74 20 70 72 6f 63 65 64 |your hos|t proced|
|00005b30| 75 72 65 2e 20 20 47 65 | 74 74 69 6e 67 20 74 6f |ure. Ge|tting to|
|00005b40| 20 79 6f 75 72 20 6c 6f | 63 61 6c 20 76 61 72 69 | your lo|cal vari|
|00005b50| 61 62 6c 65 20 69 73 20 | 6e 6f 77 20 6a 75 73 74 |able is |now just|
|00005b60| 20 61 20 6d 61 74 74 65 | 72 20 6f 66 20 64 65 72 | a matte|r of der|
|00005b70| 65 66 65 72 65 6e 63 69 | 6e 67 20 74 68 65 20 73 |eferenci|ng the s|
|00005b80| 74 61 74 69 63 4c 69 6e | 6b 20 70 61 72 61 6d 65 |taticLin|k parame|
|00005b90| 74 65 72 2e 0d 00 00 12 | 00 00 0c 00 00 14 00 ad |ter.....|........|
|00005ba0| 0c 00 00 16 00 b7 0c 00 | 00 14 00 30 00 00 7d 0f |........|...0..}.|
|00005bb0| 28 f2 8f 54 f4 74 6f 7a | 14 0f 2a f2 97 21 f6 df |(..T.toz|..*..!..|
|00005bc0| 2d f3 ef 47 46 f7 a1 9f | 4f dd f5 4b 1f 43 a7 dd |-..GF...|O..K.C..|
|00005bd0| f2 8f 29 f2 90 f7 bf 0d | 00 06 00 00 09 00 00 16 |..).....|........|
|00005be0| 20 76 6f 69 00 1e 20 20 | 20 20 28 54 47 72 61 7a | voi.. | (TGraz|
|00005bf0| 65 72 20 2a 29 69 74 65 | 6d 2d 3e 47 72 61 7a 65 |er *)ite|m->Graze|
|00005c00| 28 29 3b 0d 00 06 00 00 | 09 00 00 16 00 00 00 00 |();.....|........|
|00005c10| 00 64 50 b0 23 00 3d 76 | 00 22 00 00 00 16 00 2e |.dP.#.=v|."......|
|00005c20| 20 20 20 20 69 6e 74 20 | 2a 67 72 61 7a 65 72 43 | int |*grazerC|
|00005c30| 6f 75 6e 74 50 74 72 20 | 3d 20 28 69 6e 74 20 2a |ountPtr |= (int *|
|00005c40| 29 20 73 74 61 74 69 63 | 4c 69 6e 6b 3b 0d 00 06 |) static|Link;...|
|00005c50| 00 00 09 00 00 16 00 01 | 0d ff 00 06 00 00 09 00 |........|........|
|00005c60| 00 16 00 19 20 20 20 20 | 2b 2b 28 2a 67 72 61 7a |.... |++(*graz|
|00005c70| 65 72 43 6f 75 6e 74 50 | 74 72 29 3b 0d ff 00 06 |erCountP|tr);....|
|00005c80| 00 00 09 00 00 16 00 00 | ff d6 00 2e 03 be 00 0d |........|........|
|00005c90| 4d 41 47 49 43 50 49 43 | 11 01 ff 69 00 16 00 29 |MAGICPIC|...i...)|
|00005ca0| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 54 4d 79 41 |pascal v|oid TMyA|
|00005cb0| 70 70 6c 69 63 61 74 69 | 6f 6e 3a 3a 47 72 61 7a |pplicati|on::Graz|
|00005cc0| 65 41 6c 6c 28 29 20 7b | 0d ff 00 06 00 00 09 00 |eAll() {|........|
|00005cd0| 00 16 00 5e 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |...^____|________|
|00005ce0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00005cf0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00005d00| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00005d10| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00005d20| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00005d30| 5f 0d 00 06 00 00 0a 00 | 00 14 00 09 01 dd 03 00 |_.......|........|
|00005d40| 00 00 00 09 02 07 02 07 | 02 10 02 10 02 10 02 10 |........|........|
|00005d50| 02 10 02 10 02 10 02 10 | 02 10 02 10 00 16 00 b4 |........|........|
|00005d60| 00 d8 00 fc 00 09 01 dd | 00 00 00 00 00 09 02 07 |........|........|
|00005d70| 02 07 02 10 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00005d80| 02 10 02 10 02 10 00 09 | 01 dd 01 00 00 00 00 09 |........|........|
|00005d90| 02 07 02 07 02 10 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00005da0| 02 10 02 10 02 10 02 10 | 00 00 ff d6 00 1b 03 be |........|........|
|00005db0| 00 0d 4d 41 47 49 43 50 | 49 43 11 01 ff 64 0c 00 |..MAGICP|IC...d..|
|00005dc0| 00 14 02 07 49 66 20 79 | 6f 75 20 6e 65 65 64 20 |....If y|ou need |
|00005dd0| 74 6f 20 70 61 73 73 20 | 6d 75 6c 74 69 70 6c 65 |to pass |multiple|
|00005de0| 20 61 6d 6f 75 6e 74 73 | 20 6f 66 20 69 6e 66 6f | amounts| of info|
|00005df0| 72 6d 61 74 69 6f 6e 2c | 20 73 75 63 68 20 61 73 |rmation,| such as|
|00005e00| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 65 20 6c | more th|an one l|
|00005e10| 6f 63 61 6c 20 76 61 72 | 69 61 62 6c 65 2c 20 70 |ocal var|iable, p|
|00005e20| 6f 73 73 69 62 6c 79 20 | 69 6e 63 6c 75 64 69 6e |ossibly |includin|
|00005e30| 67 20 61 20 72 65 66 65 | 72 65 6e 63 65 20 74 6f |g a refe|rence to|
|00005e40| 20 74 68 69 73 2c 20 79 | 6f 75 20 63 61 6e 20 64 | this, y|ou can d|
|00005e50| 6f 20 73 6f 20 77 69 74 | 68 20 61 20 73 74 72 75 |o so wit|h a stru|
|00005e60| 63 74 2e 20 20 54 68 69 | 73 20 73 74 72 75 63 74 |ct. Thi|s struct|
|00005e70| 20 77 6f 75 6c 64 20 68 | 6f 6c 64 20 61 6c 6c 20 | would h|old all |
|00005e80| 74 68 65 20 6c 6f 63 61 | 6c 20 76 61 72 69 61 62 |the loca|l variab|
|00005e90| 6c 65 73 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 |les you |need to |
|00005ea0| 70 61 73 73 20 74 6f 20 | 74 68 65 20 63 61 6c 6c |pass to |the call|
|00005eb0| 62 61 63 6b 20 72 6f 75 | 74 69 6e 65 2e 20 20 59 |back rou|tine. Y|
|00005ec0| 6f 75 20 77 6f 75 6c 64 | 20 64 65 63 6c 61 72 65 |ou would| declare|
|00005ed0| 20 61 6e 20 69 6e 73 74 | 61 6e 63 65 20 6f 66 20 | an inst|ance of |
|00005ee0| 74 68 69 73 20 73 74 72 | 75 63 74 20 69 6e 20 79 |this str|uct in y|
|00005ef0| 6f 75 72 20 6c 6f 63 61 | 6c 20 70 61 72 61 6d 65 |our loca|l parame|
|00005f00| 74 65 72 20 6c 69 73 74 | 20 61 6e 64 20 70 61 73 |ter list| and pas|
|00005f10| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 69 |s a poin|ter to i|
|00005f20| 74 20 61 73 20 74 68 65 | 20 73 74 61 74 69 63 20 |t as the| static |
|00005f30| 6c 69 6e 6b 2e 20 20 49 | 6e 20 79 6f 75 72 20 63 |link. I|n your c|
|00005f40| 61 6c 6c 62 61 63 6b 20 | 70 72 6f 63 65 64 75 72 |allback |procedur|
|00005f50| 65 2c 20 79 6f 75 20 77 | 6f 75 6c 64 20 63 6f 65 |e, you w|ould coe|
|00005f60| 72 63 65 20 74 68 65 20 | 73 74 61 74 69 63 4c 69 |rce the |staticLi|
|00005f70| 6e 6b 20 76 61 72 69 61 | 62 6c 65 20 62 61 63 6b |nk varia|ble back|
|00005f80| 20 69 6e 74 6f 20 61 20 | 50 6f 69 6e 74 65 72 20 | into a |Pointer |
|00005f90| 74 6f 20 74 68 69 73 20 | 73 74 72 75 63 74 2c 20 |to this |struct, |
|00005fa0| 61 6e 64 20 74 68 65 6e | 20 67 65 74 20 61 6c 6c |and then| get all|
|00005fb0| 20 74 68 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | the inf|ormation|
|00005fc0| 20 79 6f 75 20 6e 65 65 | 64 2e 0d ff 00 5a 00 00 | you nee|d....Z..|
|00005fd0| 0c 00 00 14 00 7d 0c 00 | 00 16 00 81 0c 00 00 14 |.....}..|........|
|00005fe0| 00 98 0c 00 00 16 00 9e | 0c 00 00 14 00 a6 0c 00 |........|........|
|00005ff0| 00 16 00 ac 0c 00 00 14 | 01 21 0c 00 00 16 01 27 |........|.!.....'|
|00006000| 0c 00 00 14 01 a4 0c 00 | 00 16 01 ae 0c 00 00 14 |........|........|
|00006010| 01 c4 0c 00 00 16 01 cb | 0c 00 00 14 01 d4 0c 00 |........|........|
|00006020| 00 16 01 da 0c 00 00 14 | 00 09 01 dd 03 00 00 00 |........|........|
|00006030| 00 09 02 07 02 07 02 10 | 02 10 02 10 02 10 02 10 |........|........|
|00006040| 02 10 02 10 02 10 02 10 | 02 10 00 09 01 dd 03 00 |........|........|
|00006050| 00 00 00 09 02 07 02 07 | 02 10 02 10 02 10 02 10 |........|........|
|00006060| 02 10 02 10 02 10 02 10 | 02 10 02 10 00 09 01 dd |........|........|
|00006070| 00 00 00 00 00 09 02 07 | 02 07 02 10 02 10 02 10 |........|........|
|00006080| 02 10 02 10 02 10 02 10 | 02 10 02 10 02 10 f3 bf |........|........|
|00006090| 0d 00 00 06 00 00 09 00 | 00 16 70 65 64 65 66 20 |........|..pedef |
|000060a0| 73 74 72 75 63 74 20 7b | 00 29 23 32 36 35 3a 09 |struct {|.)#265:.|
|000060b0| 50 61 73 63 61 6c 20 74 | 6f 20 43 3a 20 20 50 52 |Pascal t|o C: PR|
|000060c0| 4f 43 45 44 55 52 45 20 | 50 61 72 61 6d 65 74 65 |OCEDURE |Paramete|
|000060d0| 72 73 0d 65 00 06 00 00 | 12 01 00 14 00 09 01 dd |rs.e....|........|
|000060e0| 03 01 00 00 00 09 01 c2 | 02 07 02 07 00 00 00 00 |........|........|
|000060f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 29 0f |........|......).|
|00006100| 7b f0 d0 00 00 06 00 00 | 09 00 00 16 00 16 00 01 |{.......|........|
|00006110| 0d ff 00 06 00 00 00 01 | 0c 0c 00 01 0c 0c 00 01 |........|........|
|00006120| 0c 0c 00 00 00 00 00 00 | 00 37 af b0 23 00 01 4c |........|.7..#..L|
|00006130| 00 0c 62 01 00 0c 00 0c | 00 37 af a4 23 00 01 58 |..b.....|.7..#..X|
|00006140| 00 0c 62 01 00 18 00 18 | 00 37 af a0 23 00 01 64 |..b.....|.7..#..d|
|00006150| 00 3c 62 01 00 06 00 00 | 09 00 00 16 01 61 f5 95 |.<b.....|.....a..|
|00006160| f7 50 f7 75 f7 5a 90 95 | 02 b7 80 73 08 72 f7 56 |.P.u.Z..|...s.r.V|
|00006170| 27 53 80 f7 7b 14 10 f7 | 95 f7 50 c6 30 f6 71 20 |'S..{...|..P.0.q |
|00006180| f6 2f 79 0f 77 72 b0 2b | 10 d5 4f 6d 6a 0e 64 6f |./y.wr.+|..Omj.do|
|00006190| 6d 12 14 80 2b 62 06 41 | 0f 67 7f 76 13 02 50 f7 |m...+b.A|.g.v..P.|
|000061a0| 95 f7 50 63 90 95 3f d5 | 20 31 19 02 50 6c c1 88 |..Pc..?.| 1..Pl..|
|000061b0| 06 3f 79 05 d0 f7 95 f7 | 54 0b 58 2f d5 80 a5 c6 |.?y.....|T.X/....|
|000061c0| a0 f7 66 47 6f 62 a1 80 | 54 02 b1 05 f6 2f 6a 1c |..fGob..|T..../j.|
|000061d0| 20 41 d1 41 3c 1f 2e 00 | f5 37 3c 10 e6 88 73 f6 | A.A<...|.7<...s.|
|000061e0| 70 60 f7 a1 45 0f 6d 16 | 38 0f d2 95 3f d5 20 ef |p`..E.m.|8...?. .|
|000061f0| 75 8b 06 08 26 27 c0 a7 | 3f 6b 05 32 50 2b 10 82 |u...&'..|?k.2P+..|
|00006200| 6c f6 bf d3 07 30 2b 78 | 0c 53 f7 61 32 75 3f 2c |l....0+x|.S.a2u?,|
|00006210| 0f 79 5f 75 0b 6f 76 10 | 25 06 9f 6a f7 58 20 2b |.y_u.ov.|%..j.X +|
|00006220| 10 e6 46 f6 d1 21 40 a7 | 82 05 d0 f7 95 f7 54 0c |..F..!@.|......T.|
|00006230| 6a af 62 6c f6 b0 f4 45 | f4 74 6f 7a 10 6c c5 49 |j.bl...E|.toz.l.I|
|00006240| 73 f6 7a f7 9f 2e f0 d0 | 00 12 00 00 0c 00 00 14 |s.z.....|........|
|00006250| 01 4c 0c 00 00 16 01 53 | 0c 00 00 14 6c 73 2d 3e |.L.....S|....ls->|
|00006260| 6f 66 66 54 68 65 43 6c | 69 66 66 20 3e 20 68 6f |offTheCl|iff > ho|
|00006270| 73 74 4c 6f 63 61 6c 73 | 2d 3e 73 65 6c 66 2d 3e |stLocals|->self->|
|00006280| 66 43 6c 69 66 66 54 68 | 72 65 73 68 68 6f 6c 64 |fCliffTh|reshhold|
|00006290| 29 20 7b 0d 00 06 00 00 | 09 00 00 16 00 1b 20 20 |) {.....|...... |
|000062a0| 20 20 20 20 20 20 41 70 | 70 6c 69 63 61 74 69 6f | Ap|plicatio|
|000062b0| 6e 42 65 65 70 28 29 3b | 0d 00 00 06 00 00 09 00 |nBeep();|........|
|000062c0| 00 16 00 06 20 20 20 20 | 7d 0d 00 06 00 00 09 00 |.... |}.......|
|000062d0| 00 16 00 02 00 43 00 30 | 00 cd 01 ae 03 ac 00 00 |.....C.0|........|
|000062e0| 00 00 00 8a 01 7e 11 01 | a0 00 82 a0 00 8c 01 00 |.....~..|........|
|000062f0| 0a 00 00 00 00 00 8a 01 | 7e 20 00 02 00 14 00 89 |........|~ ......|
|00006300| 00 14 a1 00 96 00 0c 02 | 00 00 00 02 00 00 00 00 |........|........|
|00006310| 00 00 00 a1 00 9a 00 08 | ff fd 00 00 00 33 00 00 |........|.....3..|
|00006320| 01 00 0a 00 0b 00 28 00 | 17 00 92 03 00 14 0d 00 |......(.|........|
|00006330| 0a 10 00 8a 01 7e 00 8a | 01 7e 2b 29 14 1a 70 72 |.....~..|.~+)..pr|
|00006340| 65 76 69 6f 75 73 20 63 | 6f 6e 74 65 6e 74 73 20 |evious c|ontents |
|00006350| 6f 66 20 73 74 61 63 6b | a0 00 97 a1 00 96 00 0c |of stack|........|
|00006360| 02 00 00 00 02 00 00 00 | 00 00 00 00 a1 00 9a 00 |........|........|
|00006370| 08 ff fc 00 00 00 26 00 | 00 01 00 0a 00 26 00 39 |......&.|.....&.9|
|00006380| 00 32 00 87 2b 11 1b 13 | 70 61 72 61 6d 65 74 65 |.2..+...|paramete|
|00006390| 72 73 20 28 69 66 20 61 | 6e 79 29 a0 00 97 a1 00 |rs (if a|ny).....|
|000063a0| 96 00 0c 02 00 00 00 02 | 00 00 00 00 00 00 00 a1 |........|........|
|000063b0| 00 9a 00 08 ff fd 00 00 | 00 30 00 00 01 00 0a 00 |........|.0......|
|000063c0| 41 00 2a 00 4d 00 8e 28 | 00 4a 00 2b 17 41 36 20 |A.*.M..(|.J.+.A6 |
|000063d0| 66 6f 72 20 43 61 6c 6c | 69 6e 67 50 72 6f 63 65 |for Call|ingProce|
|000063e0| 64 75 72 65 a0 00 97 a1 | 00 96 00 0c 02 00 00 00 |dure....|........|
|000063f0| 02 00 00 00 00 00 00 00 | a1 00 9a 00 08 ff fc 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.